jon-wei opened a new pull request #9362: Fix handling for columns that appear 
multiple times in join conditions
URL: https://github.com/apache/druid/pull/9362
 
 
   Fixes #9327 and #9328 
   
   This PR fixes #9327 by calling `getBindingIfIdentifier` on the expressions 
that appear in join equiconditions instead of `getIdentifierIfIdentifier` when 
creating the `Equality` objects.
   
   This PR fixes #9328 by adjusting `JoinFilterAnalyzer`:
   - The equicondition map now uses `Set<Expr>` for its values
   - `findCorrelatedBaseTableColumns` has been adjusted to handle the mappings 
of RHS columns to expression sets, instead of just single expressions
   
   Additionally, this fixes issues with join conditions where one LHS column is 
joined to two different RHS columns:
   - Call `getBindingIfIdentifier` instead of `getIdentifierIfIdentifier` in 
`ColumnProcessor`
   - Adds a correlation deduplication step to `findCorrelatedBaseTableColumns` 
(see `eliminateCorrelationDuplicates` for details)
   
   This PR has:
   - [x] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [x] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml)
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to