From b774973852d876d0f659353c462aafdb0663391b Mon Sep 17 00:00:00 2001 From: Colin Dellow Date: Sun, 24 Jun 2018 14:51:54 -0400 Subject: [PATCH] Avoid row filter check when no constraints The function call overhead is expensive! This makes count(*) on the census data 175ms instead of 225ms, while not significantly impacting other use cases. --- parquet/parquet_cursor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parquet/parquet_cursor.cc b/parquet/parquet_cursor.cc index f4912ba..4a93b5b 100644 --- a/parquet/parquet_cursor.cc +++ b/parquet/parquet_cursor.cc @@ -706,7 +706,7 @@ start: rowsLeftInRowGroup--; rowId++; - if(!currentRowSatisfiesFilter()) + if(constraints.size() > 0 && !currentRowSatisfiesFilter()) goto start; }