diff options
author | Wenchen Fan <wenchen@databricks.com> | 2017-04-10 13:36:08 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2017-04-10 13:36:08 +0800 |
commit | 3d7f201f2adc2d33be6f564fa76435c18552f4ba (patch) | |
tree | 2c34606cf5cf36da43cf4d9b7056bf2b0c33cd44 /core | |
parent | 1a0bc41659eef317dcac18df35c26857216a4314 (diff) | |
download | spark-3d7f201f2adc2d33be6f564fa76435c18552f4ba.tar.gz spark-3d7f201f2adc2d33be6f564fa76435c18552f4ba.tar.bz2 spark-3d7f201f2adc2d33be6f564fa76435c18552f4ba.zip |
[SPARK-20229][SQL] add semanticHash to QueryPlan
## What changes were proposed in this pull request?
Like `Expression`, `QueryPlan` should also have a `semanticHash` method, then we can put plans to a hash map and look it up fast. This PR refactors `QueryPlan` to follow `Expression` and put all the normalization logic in `QueryPlan.canonicalized`, so that it's very natural to implement `semanticHash`.
follow-up: improve `CacheManager` to leverage this `semanticHash` and speed up plan lookup, instead of iterating all cached plans.
## How was this patch tested?
existing tests. Note that we don't need to test the `semanticHash` method, once the existing tests prove `sameResult` is correct, we are good.
Author: Wenchen Fan <wenchen@databricks.com>
Closes #17541 from cloud-fan/plan-semantic.
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions