calcite icon indicating copy to clipboard operation
calcite copied to clipboard

Test case for [CALCITE-6882] RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

Open julianhyde opened this issue 9 months ago • 2 comments

Test case for [CALCITE-6882] RelMdColumnUniqueness incorrectly claims fields are not unique if constant refinement occurs in a node above join

If you comment out the first line of the method RelMdColumnUniqueness.areColumnsUnique(Filter, ...), the test passes. But all that line does is broaden columns from {0} to {0, 10}, which ordinarily should make areColumnsUnique more likely to return true.

The problem seems to be in areColumnsUnique(Join, ...), which will returns true for {0} (one column from the left side of the join) and false for a {0, 10} (one column from the each side of the join).

A few places in that method have 'if (columns.cardinality() > 0)', and I see no good reason why the empty set should be treated differently.

julianhyde avatar Apr 02 '25 00:04 julianhyde

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jun 28 '25 03:06 github-actions[bot]

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Oct 25 '25 03:10 github-actions[bot]