makarandhinge commented on issue #545:
URL: https://github.com/apache/wayang/issues/545#issuecomment-3950510461

   
   Hi @mspruc ,
   
   Regarding the TODO “needs `withSqlImplementation()` for SQL support,” here’s 
the approach I am considering:
   
   1. Add `withSqlImplementation()`to the `TransformationDescriptor`s for left 
and right keys in `getJoinOperator()`. This will allow each key extractor to 
provide its SQL representation when generating queries via `JdbcExecutor`.
   
   2. Handle multi-condition joins dynamically: For joins like `JOIN x ON 
x.col1 = y.col1 AND x.col2 = y.col2`, the SQL should combine each key 
comparison with `AND`. The column names can be extracted from `RexInputRef`s at 
runtime or default to field positions if dynamic extraction is not possible.
   
   3. Integration with `JdbcExecutor`: Ensure that when `createSqlClause()` is 
called, it uses the SQL strings from `.withSqlImplementation()` for both left 
and right key descriptors, respecting table aliases if present.
   
   4. Testing: Validate that multi-key joins generate correct SQL statements 
and run successfully on a database backend, verifying both the syntax and 
correctness of joined results.
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to