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) { if(column == -1) {
rv = currentRowGroupSatisfiesRowIdFilter(constraints[i]); rv = currentRowGroupSatisfiesRowIdFilter(constraints[i]);
} else { } 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) { if(op == IsNull) {
rv = stats->null_count() > 0;
} else if(op == IsNotNull) { } else if(op == IsNotNull) {
rv = stats->num_values() > 0;
} }
} }

View File

@ -39,7 +39,7 @@ main() {
exit 1 exit 1
fi fi
if [ "$(cat testcases.txt | wc -l)" == "1" ]; then if [ ! -v NO_DEBUG ] && [ "$(cat testcases.txt | wc -l)" == "1" ]; then
set -x set -x
gdb -ex run --args "$root"/sqlite/sqlite3 -init testcase-cmds.txt gdb -ex run --args "$root"/sqlite/sqlite3 -init testcase-cmds.txt
else else