Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20394#discussion_r163798968
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala ---
@@ -169,14 +169,17 @@ class CacheManager extends Logging {
/** Replaces segments of the given logical plan with cached versions
where possible. */
def useCachedData(plan: LogicalPlan): LogicalPlan = {
val newPlan = plan transformDown {
+ // Do not lookup the cache by hint node. Hint node is special, we
should ignore it when
+ // canonicalizing plans, so that plans which are same except hint
can hit the same cache.
+ // However, we also want to keep the hint info after cache lookup.
Here we skip the hint
+ // node, so that the returned caching plan won't replace the hint
node and drop the hint info
+ // from the original plan.
+ case hint: ResolvedHint => hint
--- End diff --
A small clean up for https://github.com/apache/spark/pull/20365
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]