-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22075] YSQL: Reenable rechecking on RowComparison filters
Summary: The previous method of binding a RowCompareExpression as a docdb scan bound is a bit inaccurate when considering NULL's. The semantics of RowCompareExpression that conflict with this can be found in the following examples: ``` SELECT (9, 8) >= (9, NULL); -> returns null SELECT (10, 8) >= (9, NULL); -> returns true SELECT (7, 8) >= (9, NULL); -> returns false ``` So if the column at which the last comparison is done in the RowCompareExpression has a NULL input, the whole result of the expression becomes NULL. There is no easy way to check this in DocDB without pushing down some rechecking expression. For that reason, we are simply reenabling rechecking for RowCompareExpressions in `yb_scan.c`. Also, 5595277/D34007 introduced pushing down an `IS_NOT_NULL` operator for every column in an RC expression. This is only accurate to do on the left-most column. We correct that in this change as well. Needs backports to: 2024.1, 2.20, 2.18 Jira: DB-10996 Test Plan: ./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressIndex' Reviewers: mtakahara, telgersma Reviewed By: mtakahara Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D34917
- Loading branch information
1 parent
c146c41
commit 718f58d
Showing
3 changed files
with
170 additions
and
14 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