code: static private int countStructFields(ObjectInspector x, ArrayList<String> allColumnNames) {
      int res = 1;
      switch(x.getCategory()) {
        case STRUCT:
          StructObjectInspector structObjectInspector = (StructObjectInspector) x;
          List<StructField> allColumns = (List<StructField>) structObjectInspector.getAllStructFieldRefs(); // column info
          for (StructField oneField : allColumns) {
            allColumnNames.add(oneField.getFieldName());
            res += countStructFields(oneField.getFieldObjectInspector(),allColumnNames);
          }
          break;
        case LIST:
          ListObjectInspector listObjectInspector = (ListObjectInspector) x;
          allColumnNames.add("list");
          res += countStructFields(listObjectInspector.getListElementObjectInspector(),allColumnNames);
          break;
        case MAP:
          MapObjectInspector mapObjectInspector = (MapObjectInspector) x;
          allColumnNames.add("mapKey");
          res += countStructFields(mapObjectInspector.getMapKeyObjectInspector(),allColumnNames);
          allColumnNames.add("mapValue");
          res += countStructFields(mapObjectInspector.getMapValueObjectInspector(),allColumnNames);
          break;
        case UNION:
          UnionObjectInspector unionObjectInspector = (UnionObjectInspector)x;
          allColumnNames.add("union");
          for( ObjectInspector xx:unionObjectInspector.getObjectInspectors())
            res += countStructFields(xx,allColumnNames);
          break;
        case PRIMITIVE:break;
        default: throw H2O.unimpl();
      }
      return res;
    }
docs: which are ignored for now