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();
}
Aggregations