Hi @Jeewan, When using a SQL query with a `UNION` in Spark, the process involves executing the subqueries within the `UNION`, combining their results, and then applying partitioning based on the specified `partition_key` column. First, Spark executes the individual subqueries and combines their results using `UNION` (which removes duplicates) or `UNION ALL` (which keeps duplicates). After this, Spark applies partitioning according to the `partition_key`, distributing the data across the specified partitions. The partitioning is applied to the combined result set, not directly influenced by the `UNION` operation itself.