Search in sources :

Example 1 with LongColumnReader

use of io.prestosql.orc.reader.LongColumnReader in project hetu-core by openlookeng.

the class TestAbstractNumbericColumnReader method testTypeCoercionBigInt.

@Test
public void testTypeCoercionBigInt() throws OrcCorruptionException {
    OrcColumn column = new OrcColumn("hdfs://hacluster/user/hive/warehouse/tpcds_orc_hive_1000.db/catalog_sales/cs_sold_date_sk=2452268/000896_0", new OrcColumnId(3), "cs_order_number", OrcType.OrcTypeKind.LONG, new OrcDataSourceId("hdfs://hacluster/user/hive/warehouse/tpcds_orc_hive_1000.db/catalog_sales/cs_sold_date_sk=2452268/000896_0"), ImmutableList.of());
    ColumnReader actualLongColumnReader = ColumnReaders.createColumnReader(type, column, AggregatedMemoryContext.newSimpleAggregatedMemoryContext(), null);
    LongColumnReader expectedLongColumnReader = new LongColumnReader(type, column, AggregatedMemoryContext.newSimpleAggregatedMemoryContext().newLocalMemoryContext(ColumnReaders.class.getSimpleName()));
    assertEquals(actualLongColumnReader.toString(), expectedLongColumnReader.toString());
}
Also used : OrcColumnId(io.prestosql.orc.metadata.OrcColumnId) LongColumnReader(io.prestosql.orc.reader.LongColumnReader) ShortColumnReader(io.prestosql.orc.reader.ShortColumnReader) DateColumnReader(io.prestosql.orc.reader.DateColumnReader) LongColumnReader(io.prestosql.orc.reader.LongColumnReader) ColumnReader(io.prestosql.orc.reader.ColumnReader) IntegerColumnReader(io.prestosql.orc.reader.IntegerColumnReader) Test(org.testng.annotations.Test)

Aggregations

OrcColumnId (io.prestosql.orc.metadata.OrcColumnId)1 ColumnReader (io.prestosql.orc.reader.ColumnReader)1 DateColumnReader (io.prestosql.orc.reader.DateColumnReader)1 IntegerColumnReader (io.prestosql.orc.reader.IntegerColumnReader)1 LongColumnReader (io.prestosql.orc.reader.LongColumnReader)1 ShortColumnReader (io.prestosql.orc.reader.ShortColumnReader)1 Test (org.testng.annotations.Test)1