@Test(expected = RuntimeException.class) public void testValidateSchemaViaIndexByName() { Types.NestedField nestedType = Types.NestedField .required(1, "a", Types.StructType.of( required(2, "b", Types.StructType.of( required(3, "c", Types.BooleanType.get()) )), required(4, "b.c", Types.BooleanType.get()) ) ); TypeUtil.indexByName(Types.StructType.of(nestedType)); }
public static Map<String, Integer> indexByName(Types.StructType struct) { return visit(struct, new IndexByName()); }
TypeUtil { public static Map<String, Integer> indexByName(Types.StructType struct) { return visit(struct, new IndexByName()); } }
TypeUtil { public static Map<String, Integer> indexByName(Types.StructType struct) { return visit(struct, new IndexByName()); } private  TypeUtil(); }
TypeUtil { public static Map<String, Integer> indexByName(Types.StructType struct) { return visit(struct, new IndexByName()); } private  TypeUtil(); static Schema select(Schema schema, Set<Integer> fieldIds); static Types.StructType select(Types.StructType struct, Set<Integer> fieldIds); static Set<Integer> getProjectedIds(Schema schema); static Set<Integer> getProjectedIds(Type type); static Types.StructType selectNot(Types.StructType struct, Set<Integer> fieldIds); static Schema selectNot(Schema schema, Set<Integer> fieldIds); static Schema join(Schema left, Schema right); static Map<String, Integer> indexByName(Types.StructType struct); static Map<String, Integer> indexByLowerCaseName(Types.StructType struct); static Map<Integer, Types.NestedField> indexById(Types.StructType struct); static Map<Integer, Integer> indexParents(Types.StructType struct); static Type assignFreshIds(Type type, NextID nextId); static Schema assignFreshIds(Schema schema, NextID nextId); static Schema assignIncreasingFreshIds(Schema schema); static Schema reassignIds(Schema schema, Schema idSourceSchema); static Type find(Schema schema, Predicate<Type> predicate); static boolean isPromotionAllowed(Type from, Type.PrimitiveType to); static void validateWriteSchema(Schema tableSchema, Schema writeSchema,
                                         Boolean checkNullability, Boolean checkOrdering); static T visit(Schema schema, SchemaVisitor<T> visitor); static T visit(Type type, SchemaVisitor<T> visitor); static T visit(Schema schema, CustomOrderSchemaVisitor<T> visitor); static T visit(Type type, CustomOrderSchemaVisitor<T> visitor); static int decimalRequiredBytes(int precision); }
TypeUtil { public static Map<String, Integer> indexByName(Types.StructType struct) { return visit(struct, new IndexByName()); } private  TypeUtil(); static Schema select(Schema schema, Set<Integer> fieldIds); static Types.StructType select(Types.StructType struct, Set<Integer> fieldIds); static Set<Integer> getProjectedIds(Schema schema); static Set<Integer> getProjectedIds(Type type); static Types.StructType selectNot(Types.StructType struct, Set<Integer> fieldIds); static Schema selectNot(Schema schema, Set<Integer> fieldIds); static Schema join(Schema left, Schema right); static Map<String, Integer> indexByName(Types.StructType struct); static Map<String, Integer> indexByLowerCaseName(Types.StructType struct); static Map<Integer, Types.NestedField> indexById(Types.StructType struct); static Map<Integer, Integer> indexParents(Types.StructType struct); static Type assignFreshIds(Type type, NextID nextId); static Schema assignFreshIds(Schema schema, NextID nextId); static Schema assignIncreasingFreshIds(Schema schema); static Schema reassignIds(Schema schema, Schema idSourceSchema); static Type find(Schema schema, Predicate<Type> predicate); static boolean isPromotionAllowed(Type from, Type.PrimitiveType to); static void validateWriteSchema(Schema tableSchema, Schema writeSchema,
                                         Boolean checkNullability, Boolean checkOrdering); static T visit(Schema schema, SchemaVisitor<T> visitor); static T visit(Type type, SchemaVisitor<T> visitor); static T visit(Schema schema, CustomOrderSchemaVisitor<T> visitor); static T visit(Type type, CustomOrderSchemaVisitor<T> visitor); static int decimalRequiredBytes(int precision);  }