avoid looking up physical type

This commit is contained in:
Colin Dellow 2018-06-23 20:42:38 -04:00
parent cbde3c73b6
commit 603153c36c
1 changed files with 11 additions and 9 deletions

View File

@ -666,11 +666,12 @@ bool ParquetCursor::currentRowSatisfiesFilter() {
} else if(op == IsNotNull) {
rv = !isNull(column);
} else {
parquet::Type::type pqType = types[column];
if(pqType == parquet::Type::BYTE_ARRAY && logicalTypes[column] == parquet::LogicalType::UTF8) {
if(logicalTypes[column] == parquet::LogicalType::UTF8) {
rv = currentRowSatisfiesTextFilter(constraints[i]);
} else if(pqType == parquet::Type::INT32 ||
} else {
parquet::Type::type pqType = types[column];
if(pqType == parquet::Type::INT32 ||
pqType == parquet::Type::INT64 ||
pqType == parquet::Type::INT96 ||
pqType == parquet::Type::BOOLEAN) {
@ -679,6 +680,7 @@ bool ParquetCursor::currentRowSatisfiesFilter() {
rv = currentRowSatisfiesDoubleFilter(constraints[i]);
}
}
}
// it defaults to false; so only set it if true
// ideally we'd short-circuit if we'd already set this group as visited