Source:
<code><START> public void testLogicalType() throws Exception{ <END> setUp(); prepareData(TOPIC, PARTITION); Partitioner partitioner = HiveTestUtils.getPartitioner(parsedConfig); Schema schema = createSchemaAllLogical(); hive.createTable(hiveDatabase, TOPIC, schema, partitioner); String location = "partition=" + String.valueOf(PARTITION); hiveMetaStore.addPartition(hiveDatabase, TOPIC, location); String precision = schema .field("decimal") .schema() .parameters() .getOrDefault(CONNECT_AVRO_DECIMAL_PRECISION_PROP, CONNECT_AVRO_DECIMAL_PRECISION_DEFAULT); String scale = SCALE + "" ; List<String> expectedColumnNames = new ArrayList<>(); for (Field field : schema.fields()) { expectedColumnNames.add(field.name()); } List<String> expectedColumnTypes = new ArrayList<>(); expectedColumnTypes.add(serdeConstants.DECIMAL_TYPE_NAME + "(" + precision + "," + scale + ")"); expectedColumnTypes.add(serdeConstants.DATE_TYPE_NAME); expectedColumnTypes.add(serdeConstants.INTERVAL_DAY_TIME_TYPE_NAME); expectedColumnTypes.add(serdeConstants.TIMESTAMP_TYPE_NAME); Table table = hiveMetaStore.getTable(hiveDatabase, TOPIC); List<String> actualColumnNames = new ArrayList<>(); List<String> actualColumnTypes = new ArrayList<>(); for (FieldSchema column : table.getSd().getCols()) { actualColumnNames.add(column.getName()); actualColumnTypes.add(column.getType()); } assertEquals(expectedColumnNames, actualColumnNames); assertEquals(expectedColumnTypes, actualColumnTypes); }</code><technical_language>nit: a bummer checkstyle run for tests, (regardless) need a space { in: Exception {</technical_language>

Target:
public void testLogicalType() throws Exception { setUp(); prepareData(TOPIC, PARTITION); Partitioner partitioner = HiveTestUtils.getPartitioner(parsedConfig); Schema schema = createSchemaAllLogical(); hive.createTable(hiveDatabase, TOPIC, schema, partitioner); String location = "partition=" + String.valueOf(PARTITION); hiveMetaStore.addPartition(hiveDatabase, TOPIC, location); String precision = schema .field("decimal") .schema() .parameters() .getOrDefault(CONNECT_AVRO_DECIMAL_PRECISION_PROP, CONNECT_AVRO_DECIMAL_PRECISION_DEFAULT); String scale = SCALE + "" ; List<String> expectedColumnNames = new ArrayList<>(); for (Field field : schema.fields()) { expectedColumnNames.add(field.name()); } List<String> expectedColumnTypes = new ArrayList<>(); expectedColumnTypes.add(serdeConstants.BINARY_TYPE_NAME); expectedColumnTypes.add(serdeConstants.INT_TYPE_NAME); expectedColumnTypes.add(serdeConstants.BIGINT_TYPE_NAME); expectedColumnTypes.add(serdeConstants.DECIMAL_TYPE_NAME + "(" + precision + "," + scale + ")"); expectedColumnTypes.add(serdeConstants.DATE_TYPE_NAME); expectedColumnTypes.add(serdeConstants.INTERVAL_DAY_TIME_TYPE_NAME); expectedColumnTypes.add(serdeConstants.TIMESTAMP_TYPE_NAME); Table table = hiveMetaStore.getTable(hiveDatabase, TOPIC); List<String> actualColumnNames = new ArrayList<>(); List<String> actualColumnTypes = new ArrayList<>(); for (FieldSchema column : table.getSd().getCols()) { actualColumnNames.add(column.getName()); actualColumnTypes.add(column.getType()); } assertEquals(expectedColumnNames, actualColumnNames); assertEquals(expectedColumnTypes, actualColumnTypes); }