dev-goyal commented on issue #7832:
URL: https://github.com/apache/iceberg/issues/7832#issuecomment-1672186881

   Facing the same issue here; `merge into` using iceberg does not appear to be 
taking advantage of the bucketing.
   
   Bucketing SQL:
   
   `
   spark.sql(
               f"MERGE INTO ml_recommendations.ratings target "
               f"USING (SELECT * FROM {temp_view}) source "
               f"    ON target.{bucket_col} = source.{bucket_col} "
               f"WHEN MATCHED AND target.{v.RATING_STATE} IS NOT NULL THEN 
UPDATE SET * "
               f"WHEN NOT MATCHED THEN INSERT *",
           ).show()
   `
   
   Notice the two exchanges below: 
   
   <img width="557" alt="Screenshot 2023-08-09 at 2 35 04 PM" 
src="https://github.com/apache/iceberg/assets/126589393/5e928e89-00ba-45b4-ac90-ee795160a691";>
   
   <img width="793" alt="Screenshot 2023-08-09 at 2 37 18 PM" 
src="https://github.com/apache/iceberg/assets/126589393/2eb3c899-028b-4b60-9bf6-7877779c1f7c";>
   
   


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