-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make eval_sql_where available to DefaultPredicateEvaluator (#627)
## What changes are proposed in this pull request? Parquet footer skipping code includes (and uses) a helpful `eval_sql_where` method that handles NULL values in comparisons gracefully, by injecting null checking automatically into the predicate's evaluation. It turns out that capability is also useful for the other predicate evaluator implementations (especially now that partition pruning will likely rely on the default predicate evaluator). So we generalize the logic as the provided method `PredicateEvaluator::eval_sql_where`. In order to support that method, we also declare a new `eval_scalar_is_null` trait method, with appropriate implementations. This has the side effect adding support for literal null checks -- previously, only columns could be null-checked. ## How was this change tested? Replace the existing unit test for the parquet skipping evaluator with adapted versions for the default and stats skipping predicate evaluator, which respectively verify that the provided method works correctly in both bool-output and expression-output cases. The parquet skipping module version is removed because it is redundant -- the default evaluator exercises boolean output, and the data skipping evaluator exercises column resolution.
- Loading branch information
Showing
9 changed files
with
393 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.