Class TestReadUniontype

java.lang.Object
io.trino.tempto.ProductTest
io.trino.tests.product.hive.HiveProductTest
io.trino.tests.product.hive.TestReadUniontype

public class TestReadUniontype extends HiveProductTest
  • Constructor Details

    • TestReadUniontype

      public TestReadUniontype()
  • Method Details

    • cleanup

      public void cleanup()
    • storageFormats

      public static Object[][] storageFormats()
    • unionDereferenceTestCases

      public static Object[][] unionDereferenceTestCases()
    • testReadUniontype

      public void testReadUniontype(String storageFormat)
    • testReadUniontypeWithDereference

      public void testReadUniontypeWithDereference(String createTableSql, String insertSql, String selectSql, List<Object> expectedResult, String selectTagSql, List<Object> expectedTagResult, String dropTableSql)
    • testUnionTypeSchemaEvolution

      public void testUnionTypeSchemaEvolution(String storageFormat)
    • testORCUnionToStructSchemaEvolution

      public void testORCUnionToStructSchemaEvolution()
      When reading AVRO file, Trino needs the schema information from Hive metastore to deserialize Avro files. Therefore, when an ALTER table was issued in which the hive metastore changed the schema into an incompatible format, from Union to Struct or from Struct to Union in this case, Trino could not read those Avro files using the modified Hive metastore schema. However, when reading ORC files, Trino does not need schema information from Hive metastore to deserialize ORC files. Therefore, it can read ORC files even after changing the schema.
    • testORCStructToUnionSchemaEvolution

      public void testORCStructToUnionSchemaEvolution()
      When reading AVRO file, Trino needs the schema information from Hive metastore to deserialize Avro files. Therefore, when an ALTER table was issued in which the hive metastore changed the schema into an incompatible format, from Union to Struct or from Struct to Union in this case, Trino could not read those Avro files using the modified Hive metastore schema. However, when reading ORC files, Trino does not need schema information from Hive metastore to deserialize ORC files. Therefore, it can read ORC files even after changing the schema.
    • testReadOrcUniontypeWithCheckpoint

      public void testReadOrcUniontypeWithCheckpoint()