public static void testLogicalTypeAnnotations(final String hiveColumnNames,
      final String hiveColumnTypes, final Map<String, LogicalTypeAnnotation> expectedLogicalTypes,
      Configuration conf) throws Exception {
    final List<String> columnNames = createHiveColumnsFrom(hiveColumnNames);
    final List<TypeInfo> columnTypes = createHiveTypeInfoFrom(hiveColumnTypes);
    final MessageType messageTypeFound = HiveSchemaConverter.convert(columnNames, columnTypes,
        conf);
    List<Type> actualFields = messageTypeFound.getFields();
    for (Type actualField : actualFields) {
      LogicalTypeAnnotation expectedLogicalType = expectedLogicalTypes.get(actualField.getName());
      LogicalTypeAnnotation actualLogicalType = actualField.getLogicalTypeAnnotation();
      if (expectedLogicalType != null) {
        assertNotNull("The logical type annotation cannot be null.", actualLogicalType);
        assertEquals("Logical type annotations of the field do not match", expectedLogicalType,
            actualLogicalType);
      } else {
        assertNull("The logical type annotation must be null.", actualLogicalType);
      }
    }
  }
Only use if Configuration/HiveConf not needed for converting schema.
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/HiveParquetSchemaTestUtils.java