Search in sources :

Example 6 with HiveDataSource

use of io.trino.tempto.fulfillment.table.hive.HiveDataSource in project trino by trinodb.

the class TestTablePartitioningSelect method singleIntColumnPartitionedTableDefinition.

private static HiveTableDefinition singleIntColumnPartitionedTableDefinition(String fileFormat, Optional<String> serde) {
    String tableName = fileFormat.toLowerCase(Locale.ENGLISH) + "_single_int_column_partitioned";
    HiveDataSource dataSource = createResourceDataSource(tableName, "io/trino/tests/product/hive/data/single_int_column/data." + fileFormat.toLowerCase(Locale.ENGLISH));
    HiveDataSource invalidData = createStringDataSource(tableName, "INVALID DATA");
    return HiveTableDefinition.builder(tableName).setCreateTableDDLTemplate(buildSingleIntColumnPartitionedTableDDL(fileFormat, serde)).addPartition("part_col = 1", invalidData).addPartition("part_col = 2", dataSource).build();
}
Also used : HiveDataSource(io.trino.tempto.fulfillment.table.hive.HiveDataSource)

Aggregations

HiveDataSource (io.trino.tempto.fulfillment.table.hive.HiveDataSource)6 ProductTest (io.trino.tempto.ProductTest)2 Flaky (io.trino.testng.services.Flaky)2 Test (org.testng.annotations.Test)2