Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add comment about inTraverse
  • Loading branch information
peter-toth committed Jul 11, 2019
commit 55a01eaac72f2376e73ecc5f68a36e35734570e3
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ object CTESubstitution extends Rule[LogicalPlan] {
substituteCTE(currentPlan, cteName, substitutedCTEPlan)
}

// CTE name collision can occur only when inTraverse is true, it helps to avoid eager CTE
// substitution in a subquery expression
case other if inTraverse =>
other.transformExpressions {
case e: SubqueryExpression => e.withNewPlan(traverseAndSubstituteCTE(e.plan, true))
Expand Down