Skip to content

Conversation

@yhuang-db
Copy link
Contributor

What changes were proposed in this pull request?

This PR extends current canonicalization function for DataSourceV2ScanRelation to normalize the keyGroupedPartitioning and ordering field. Therefore it can apply to partition/ordering-aware data sources.

Why are the changes needed?

In order to apply canonicalization to partition/ordering-aware data sources.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Unit tests.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Nov 18, 2025
@gengliangwang
Copy link
Member

Thanks, merging to master/4.1
cc @dongjoon-hyun

gengliangwang pushed a commit that referenced this pull request Nov 18, 2025
…g info

### What changes were proposed in this pull request?

This PR extends current canonicalization function for DataSourceV2ScanRelation to normalize the keyGroupedPartitioning and ordering field. Therefore it can apply to partition/ordering-aware data sources.

### Why are the changes needed?

In order to apply canonicalization to partition/ordering-aware data sources.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Unit tests.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #53105 from yhuang-db/SPARK-54163-canonicalization-normalization.

Authored-by: yhuang-db <itisyuchuan@gmail.com>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
(cherry picked from commit 1012a5f)
Signed-off-by: Gengliang Wang <gengliang@apache.org>
@dongjoon-hyun
Copy link
Member

So, this landed as a kind of follow-up bug fix of this, @gengliangwang ?

@gengliangwang
Copy link
Member

@dongjoon-hyun yes. WhenkeyGroupedPartitioning and ordering are present, we need to normallize the expression in the canonicalization.

@dongjoon-hyun
Copy link
Member

Got it. Thank you, @gengliangwang . +1 for your decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants