[
https://issues.apache.org/jira/browse/CALCITE-7816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
krooswu reassigned CALCITE-7816:
--------------------------------
Assignee: krooswu
> SEMI join simplification duplicates a singleton left row
> --------------------------------------------------------
>
> Key: CALCITE-7816
> URL: https://issues.apache.org/jira/browse/CALCITE-7816
> Project: Calcite
> Issue Type: Bug
> Reporter: Bruno Volpato
> Assignee: krooswu
> Priority: Major
>
> A SEMI join must return each matching left row once. With left `VALUES (1)`
> and right `VALUES (1), (1)`, the original join returns one row. The
> left-singleton simplification rewrites the join as a filter and projection
> over the right input, so it returns two rows. The Project-over-Values variant
> has the same problem.
> Expected: one left row.
> Actual: two identical left rows after simplification.
> The left-singleton rules should skip SEMI joins. The right-singleton SEMI
> optimization is unaffected.
> Fix and regression tests: https://github.com/apache/calcite/pull/5241
--
This message was sent by Atlassian Jira
(v8.20.10#820010)