renato2099 commented on PR #1320:
URL: 
https://github.com/apache/datafusion-python/pull/1320#issuecomment-3708330200

   I am thinking that we could have a follow up on this path to be more 
ergonomic though + a more future-proof API (non-breaking path). Basically, we 
could introduce an enum-like parameter alongside the boolean, deprecating the 
latter later on, we could have something like:
   ```
   join_key_behavior: Literal[
       "drop_right",     # current drop_duplicate_keys=True
       "keep_both",      # current drop_duplicate_keys=False
       "coalesce",       # coalesce both columns if that is really what user 
wants to do
   ] | None = None
   ```
   Then 
   - If join_key_behavior is provided, then we would ignore drop_duplicate_keys
   - FULL JOIN would allow only "keep_both"
   - INNER / LEFT / RIGHT would allow "drop_right" or "keep_both"
   
   but we could do that in a follow up PR, wdyt @kosiew ?


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


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

Reply via email to