HyukjinKwon commented on code in PR #43465:
URL: https://github.com/apache/spark/pull/43465#discussion_r1368058154


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ColumnResolutionHelper.scala:
##########
@@ -490,39 +477,46 @@ trait ColumnResolutionHelper extends Logging {
     }
   }
 
-  private def resolveExpressionByPlanId(
+  // If the TreeNodeTag 'LogicalPlan.PLAN_ID_TAG' is attached, it means that 
the plan and
+  // expression are from Spark Connect, and need to be resolved in this way:
+  //    1. extract the attached plan id from UnresolvedAttribute;
+  //    2. top-down traverse the query plan to find the plan node that matches 
the plan id;
+  //    3. if can not find the matching node, fail the analysis due to illegal 
references;
+  //    4. if more than one matching nodes are found, fail due to ambiguous 
column reference;

Review Comment:
   Just for my own understanding, does it mean that it fails when more than one 
matching nodes are found within the same level children?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to