Skip to content

Conversation

yhuang-db
Copy link
Contributor

@yhuang-db yhuang-db commented Oct 6, 2025

What changes were proposed in this pull request?

This PR proposes to add doCanonicalize function for dsv2 Scan interface. The reason is that filters pushed to the scan (e.g., via SupportsRuntimeV2Filtering) may come in different orders after QO rewrite, while the scans are identical in fact.

As a result, DataSourceV2ScanRelation and BatchScanExec, who have a scan field, also need to add canonicalization accordingly.

Why are the changes needed?

Query optimization rules such as MergeScalarSubqueries check if two plans are identical by comparing their canonicalized form. For DSv2, the comparison goes down to DataSourceV2ScanRelation in the hierarchy, which currently lacks of canonicalize function.

Does this PR introduce any user-facing change?

No

How was this patch tested?

todo

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

No

@github-actions github-actions bot added the SQL label Oct 6, 2025
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.

1 participant