Skip to content

[CALCITE-2803] ProjectTransposeJoinRule messes INDF expressions#1016

Merged
laurentgo merged 1 commit intoapache:masterfrom
laurentgo:laurentgo/CALCITE-2803
May 13, 2019
Merged

[CALCITE-2803] ProjectTransposeJoinRule messes INDF expressions#1016
laurentgo merged 1 commit intoapache:masterfrom
laurentgo:laurentgo/CALCITE-2803

Conversation

@laurentgo
Copy link
Contributor

ProjectTransposeJoinRule does not identify expanded versions of IS NOT
DISTINCT FROM expressions in the join filter, and might push them below
the join operator in a way which makes impossible for
RelOptUtil#splitJoinCondition() to identify the INDF condition and mis-
categorize the join as not being an equi-join.

Fix the issue by collapsing INDF expressions before invoking PushProjector.
Also add support for expanded form CASE(WHEN A IS NULL THEN B IS NULL
WHEN B IS NULL THEN A IS NULL ELSE A = B).

@michaelmior
Copy link
Member

@laurentgo Could you fix the import order issue that's causing checkstyle to fail? (See the Travis tests.)

@laurentgo
Copy link
Contributor Author

Will do. The newer checkstyle version is more restrictive, and my IDE (Eclipse) cannot automatically format the imports in a way which will satisfy the checker :(

@laurentgo laurentgo force-pushed the laurentgo/CALCITE-2803 branch 2 times, most recently from 4ff2e37 to 39cefdf Compare March 5, 2019 22:48
@michaelmior
Copy link
Member

Great! tbh, I haven't taken the time tot fully understand the issue here, but I see that existing tests are passing and you added new tests. I'm happy to trust you to combine this PR into a single commit and push when ready.

@laurentgo
Copy link
Contributor Author

Will do (looks like the squash and merge option is disabled, so I'll be doing it manually)

@laurentgo laurentgo added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Mar 12, 2019
@laurentgo laurentgo force-pushed the laurentgo/CALCITE-2803 branch from 39cefdf to 99e5382 Compare May 10, 2019 23:09
ProjectTransposeJoinRule does not identify expanded versions of IS NOT
DISTINCT FROM expressions in the join filter, and might push them below
the join operator in a way which makes impossible for
RelOptUtil#splitJoinCondition() to identify the INDF condition and mis-
categorize the join as not being an equi-join.

Fix the issue by collapsing INDF expressions before invoking PushProjector.
Also add support for expanded form CASE(WHEN A IS NULL THEN B IS NULL
WHEN B IS NULL THEN A IS NULL ELSE A = B).
@laurentgo laurentgo force-pushed the laurentgo/CALCITE-2803 branch from 99e5382 to d059953 Compare May 13, 2019 16:57
@laurentgo laurentgo merged commit c25b29c into apache:master May 13, 2019
@laurentgo laurentgo deleted the laurentgo/CALCITE-2803 branch May 13, 2019 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants