1
0
mirror of https://github.com/cldellow/sqlite-parquet-vtable.git synced 2025-09-10 22:28:53 +00:00

row group skipping for is [not] null queries

This commit is contained in:
Colin Dellow
2018-03-12 21:09:00 -04:00
parent 95748a5192
commit 110e3e3668
2 changed files with 8 additions and 3 deletions

View File

@@ -44,11 +44,16 @@ bool ParquetCursor::currentRowGroupSatisfiesFilter() {
if(column == -1) {
rv = currentRowGroupSatisfiesRowIdFilter(constraints[i]);
} else {
// printf("column = %d\n", column);
// std::unique_ptr<parquet::ColumnChunkMetaData> md = rowGroupMetadata->ColumnChunk(column);
std::unique_ptr<parquet::ColumnChunkMetaData> md = rowGroupMetadata->ColumnChunk(column);
if(!md->is_stats_set()) {
continue;
}
std::shared_ptr<parquet::RowGroupStatistics> stats = md->statistics();
if(op == IsNull) {
rv = stats->null_count() > 0;
} else if(op == IsNotNull) {
rv = stats->num_values() > 0;
}
}