@Test public void testDateTimeFieldSpec() throws IOException { Schema pinotSchema; pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"x:HOURS:EPOCH\",\"granularity\":\"1:HOURS\"}]}"); checkValidationFails(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:DUMMY:EPOCH\",\"granularity\":\"1:HOURS\"}]}"); checkValidationFails(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:HOURS:DUMMY\",\"granularity\":\"1:HOURS\"}]}"); checkValidationFails(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:HOURS:EPOCH\",\"granularity\":\"x:HOURS\"}]}"); checkValidationFails(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:HOURS:EPOCH\",\"granularity\":\"1:DUMMY\"}]}"); checkValidationFails(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:DAYS:SIMPLE_DATE_FORMAT\",\"granularity\":\"1:DAYS\"}]}"); checkValidationFails(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:HOURS:EPOCH\",\"granularity\":\"1:HOURS\"}]}"); SchemaUtils.validate(pinotSchema); pinotSchema = Schema.fromString( "{\"schemaName\":\"testSchema\"," + "\"dimensionFieldSpecs\":[ {\"name\":\"dim1\",\"dataType\":\"STRING\"}]," + "\"dateTimeFieldSpecs\":[{\"name\":\"dt1\",\"dataType\":\"INT\",\"format\":\"1:DAYS:SIMPLE_DATE_FORMAT:yyyyMMdd\",\"granularity\":\"1:DAYS\"}]}"); SchemaUtils.validate(pinotSchema); }
public static void validate(Schema schema, List<TableConfig> tableConfigs) { for (TableConfig tableConfig : tableConfigs) { validateCompatibilityWithTableConfig(schema, tableConfig); } validate(schema); }
SchemaUtils { public static void validate(Schema schema, List<TableConfig> tableConfigs) { for (TableConfig tableConfig : tableConfigs) { validateCompatibilityWithTableConfig(schema, tableConfig); } validate(schema); } }
SchemaUtils { public static void validate(Schema schema, List<TableConfig> tableConfigs) { for (TableConfig tableConfig : tableConfigs) { validateCompatibilityWithTableConfig(schema, tableConfig); } validate(schema); }  }
SchemaUtils { public static void validate(Schema schema, List<TableConfig> tableConfigs) { for (TableConfig tableConfig : tableConfigs) { validateCompatibilityWithTableConfig(schema, tableConfig); } validate(schema); }  static void validate(Schema schema, List<TableConfig> tableConfigs); static void validate(Schema schema); }
SchemaUtils { public static void validate(Schema schema, List<TableConfig> tableConfigs) { for (TableConfig tableConfig : tableConfigs) { validateCompatibilityWithTableConfig(schema, tableConfig); } validate(schema); }  static void validate(Schema schema, List<TableConfig> tableConfigs); static void validate(Schema schema); static final String MAP_KEY_COLUMN_SUFFIX; static final String MAP_VALUE_COLUMN_SUFFIX; }