Search in sources :

Example 1 with ColumnHandle

use of io.prestosql.spi.connector.ColumnHandle in project carbondata by apache.

the class CarbondataPageSource method getCarbonProjection.

/**
 * @param columns
 * @return
 */
private CarbonProjection getCarbonProjection(List<? extends ColumnHandle> columns) {
    CarbonProjection carbonProjection = new CarbonProjection();
    // Convert all columns handles
    ImmutableList.Builder<HiveColumnHandle> handles = ImmutableList.builder();
    for (ColumnHandle handle : columns) {
        handles.add(Types.checkType(handle, HiveColumnHandle.class, "handle"));
        carbonProjection.addColumn(((HiveColumnHandle) handle).getName());
    }
    return carbonProjection;
}
Also used : HiveColumnHandle(io.prestosql.plugin.hive.HiveColumnHandle) ColumnHandle(io.prestosql.spi.connector.ColumnHandle) CarbonProjection(org.apache.carbondata.hadoop.CarbonProjection) ImmutableList(com.google.common.collect.ImmutableList) HiveColumnHandle(io.prestosql.plugin.hive.HiveColumnHandle)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 HiveColumnHandle (io.prestosql.plugin.hive.HiveColumnHandle)1 ColumnHandle (io.prestosql.spi.connector.ColumnHandle)1 CarbonProjection (org.apache.carbondata.hadoop.CarbonProjection)1