GitHub user wzhfy opened a pull request:
https://github.com/apache/spark/pull/17959
[SPARK-20718][SQL] FileSourceScanExec with different filter orders should
be the same after canonicalization
## What changes were proposed in this pull request?
Since `constraints` in `QueryPlan` is a set, the order of filters can
differ. Usually this is ok because of canonicalization. However, in
`FileSourceScanExec`, its data filters and partition filters are sequences, and
their orders are not canonicalized. So `def sameResult` returns different
results for different orders of data/partition filters. This leads to, e.g.
different decision for `ReuseExchange`, and thus results in unstable
performance.
## How was this patch tested?
Added a new test for `FileSourceScanExec.sameResult`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wzhfy/spark canonicalizeFileSourceScanExec
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17959.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17959
----
commit 9ec86ec1941bf0c329f4c6a1fb75271e91e51660
Author: wangzhenhua <[email protected]>
Date: 2017-05-12T03:11:34Z
same result for FileSourceScanExec with different filter orders
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]