use of com.facebook.presto.hive.parquet.predicate.TupleDomainParquetPredicate.ColumnReference in project presto by prestodb.
the class ParquetPredicateUtils method buildParquetPredicate.
public static ParquetPredicate buildParquetPredicate(List<HiveColumnHandle> columns, TupleDomain<HiveColumnHandle> effectivePredicate, MessageType fileSchema, TypeManager typeManager) {
ImmutableList.Builder<ColumnReference<HiveColumnHandle>> columnReferences = ImmutableList.builder();
for (HiveColumnHandle column : columns) {
if (!column.isPartitionKey()) {
int parquetFieldIndex = lookupParquetColumn(column, fileSchema);
Type type = typeManager.getType(column.getTypeSignature());
columnReferences.add(new ColumnReference<>(column, parquetFieldIndex, type));
}
}
return new TupleDomainParquetPredicate<>(effectivePredicate, columnReferences.build());
}
Aggregations