Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.0
Description
Query optimization rules such as MergeScalarSubqueries check if two plans are identical by comparing their canonicalized form. For DSv2, for physical plan, the canonicalization goes down in the child hierarchy to the BatchScanExec, which has a doCanonicalize function; for logical plan, the canonicalization goes down to the DataSourceV2ScanRelation, which, however, does not have a doCanonicalize function. As a result, two logical plans who are semantically identical are not identified.
This PR proposes to add doCanonicalize function for DataSourceV2ScanRelation. The implementation is similar to the one implemented in BatchScanExec, because they are both the leafNodes of DSv2 logicalPlan and physicalPlan, respectively.
Attachments
Issue Links
- links to