Search in sources :

Example 1 with ParquetFileWriterFactory

use of io.trino.plugin.hive.parquet.ParquetFileWriterFactory in project trino by trinodb.

the class TestHiveFileFormats method testOptimizedParquetWriter.

@Test(dataProvider = "rowCount")
public void testOptimizedParquetWriter(int rowCount) throws Exception {
    ConnectorSession session = getHiveSession(new HiveConfig(), new ParquetWriterConfig().setParquetOptimizedWriterEnabled(true));
    assertTrue(HiveSessionProperties.isParquetOptimizedWriterEnabled(session));
    List<TestColumn> testColumns = getTestColumnsSupportedByParquet();
    assertThatFileFormat(PARQUET).withSession(session).withColumns(testColumns).withRowsCount(rowCount).withFileWriterFactory(new ParquetFileWriterFactory(HDFS_ENVIRONMENT, new NodeVersion("test-version"), TESTING_TYPE_MANAGER)).isReadableByPageSource(new ParquetPageSourceFactory(HDFS_ENVIRONMENT, STATS, new ParquetReaderConfig(), new HiveConfig()));
}
Also used : ParquetWriterConfig(io.trino.plugin.hive.parquet.ParquetWriterConfig) ConnectorSession(io.trino.spi.connector.ConnectorSession) TestingConnectorSession(io.trino.testing.TestingConnectorSession) ParquetFileWriterFactory(io.trino.plugin.hive.parquet.ParquetFileWriterFactory) ParquetPageSourceFactory(io.trino.plugin.hive.parquet.ParquetPageSourceFactory) ParquetReaderConfig(io.trino.plugin.hive.parquet.ParquetReaderConfig) Test(org.testng.annotations.Test)

Aggregations

ParquetFileWriterFactory (io.trino.plugin.hive.parquet.ParquetFileWriterFactory)1 ParquetPageSourceFactory (io.trino.plugin.hive.parquet.ParquetPageSourceFactory)1 ParquetReaderConfig (io.trino.plugin.hive.parquet.ParquetReaderConfig)1 ParquetWriterConfig (io.trino.plugin.hive.parquet.ParquetWriterConfig)1 ConnectorSession (io.trino.spi.connector.ConnectorSession)1 TestingConnectorSession (io.trino.testing.TestingConnectorSession)1 Test (org.testng.annotations.Test)1