Search in sources :

Example 11 with OrcMetadataReader

use of com.facebook.presto.orc.metadata.OrcMetadataReader in project presto by prestodb.

the class OrcTestingUtil method createReaderNoRows.

public static OrcRecordReader createReaderNoRows(OrcDataSource dataSource) throws IOException {
    OrcReader orcReader = new OrcReader(dataSource, new OrcMetadataReader(), new DataSize(1, Unit.MEGABYTE), new DataSize(1, Unit.MEGABYTE));
    assertEquals(orcReader.getColumnNames().size(), 0);
    return createRecordReader(orcReader, ImmutableMap.of());
}
Also used : OrcReader(com.facebook.presto.orc.OrcReader) OrcMetadataReader(com.facebook.presto.orc.metadata.OrcMetadataReader) DataSize(io.airlift.units.DataSize)

Aggregations

OrcMetadataReader (com.facebook.presto.orc.metadata.OrcMetadataReader)11 DataSize (io.airlift.units.DataSize)5 Test (org.testng.annotations.Test)5 OrcReader (com.facebook.presto.orc.OrcReader)4 TempFile (com.facebook.presto.orc.OrcTester.TempFile)4 IOException (java.io.IOException)4 OrcTester.createCustomOrcRecordReader (com.facebook.presto.orc.OrcTester.createCustomOrcRecordReader)3 Footer (com.facebook.presto.orc.metadata.Footer)3 Block (com.facebook.presto.spi.block.Block)3 ImmutableMap (com.google.common.collect.ImmutableMap)3 Slice (io.airlift.slice.Slice)3 FileOrcDataSource (com.facebook.presto.orc.FileOrcDataSource)2 OrcDataSource (com.facebook.presto.orc.OrcDataSource)2 ORC_12 (com.facebook.presto.orc.OrcTester.Format.ORC_12)2 OrcTester.createOrcRecordWriter (com.facebook.presto.orc.OrcTester.createOrcRecordWriter)2 OrcTester.createSettableStructObjectInspector (com.facebook.presto.orc.OrcTester.createSettableStructObjectInspector)2 AggregatedMemoryContext (com.facebook.presto.orc.memory.AggregatedMemoryContext)2 IntegerStatistics (com.facebook.presto.orc.metadata.IntegerStatistics)2 PrestoException (com.facebook.presto.spi.PrestoException)2 BIGINT (com.facebook.presto.spi.type.BigintType.BIGINT)2