Search in sources :

Example 6 with TestingConnectorSession

use of com.facebook.presto.testing.TestingConnectorSession in project presto by prestodb.

the class TestHiveFileFormats method testRcTextPageSource.

@Test(dataProvider = "rowCount")
public void testRcTextPageSource(int rowCount) throws Exception {
    TestingConnectorSession session = new TestingConnectorSession(new HiveSessionProperties(new HiveClientConfig().setRcfileOptimizedReaderEnabled(true)).getSessionProperties());
    assertThatFileFormat(RCTEXT).withColumns(TEST_COLUMNS).withRowsCount(rowCount).withSession(session).isReadableByPageSource(new RcFilePageSourceFactory(TYPE_MANAGER, HDFS_ENVIRONMENT));
}
Also used : TestingConnectorSession(com.facebook.presto.testing.TestingConnectorSession) RcFilePageSourceFactory(com.facebook.presto.hive.rcfile.RcFilePageSourceFactory) Test(org.testng.annotations.Test)

Aggregations

TestingConnectorSession (com.facebook.presto.testing.TestingConnectorSession)6 Test (org.testng.annotations.Test)5 RcFilePageSourceFactory (com.facebook.presto.hive.rcfile.RcFilePageSourceFactory)4 OrcPageSourceFactory (com.facebook.presto.hive.orc.OrcPageSourceFactory)2 AVRO (com.facebook.presto.hive.HiveStorageFormat.AVRO)1 DWRF (com.facebook.presto.hive.HiveStorageFormat.DWRF)1 JSON (com.facebook.presto.hive.HiveStorageFormat.JSON)1 ORC (com.facebook.presto.hive.HiveStorageFormat.ORC)1 PARQUET (com.facebook.presto.hive.HiveStorageFormat.PARQUET)1 RCBINARY (com.facebook.presto.hive.HiveStorageFormat.RCBINARY)1 RCTEXT (com.facebook.presto.hive.HiveStorageFormat.RCTEXT)1 SEQUENCEFILE (com.facebook.presto.hive.HiveStorageFormat.SEQUENCEFILE)1 TEXTFILE (com.facebook.presto.hive.HiveStorageFormat.TEXTFILE)1 HDFS_ENVIRONMENT (com.facebook.presto.hive.HiveTestUtils.HDFS_ENVIRONMENT)1 SESSION (com.facebook.presto.hive.HiveTestUtils.SESSION)1 TYPE_MANAGER (com.facebook.presto.hive.HiveTestUtils.TYPE_MANAGER)1 HiveTestUtils.getTypes (com.facebook.presto.hive.HiveTestUtils.getTypes)1 DwrfPageSourceFactory (com.facebook.presto.hive.orc.DwrfPageSourceFactory)1 ParquetPageSourceFactory (com.facebook.presto.hive.parquet.ParquetPageSourceFactory)1 ParquetRecordCursorProvider (com.facebook.presto.hive.parquet.ParquetRecordCursorProvider)1