allisonwang-db commented on code in PR #47447:
URL: https://github.com/apache/spark/pull/47447#discussion_r1688663641
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -391,6 +391,17 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog with QueryErrorsB
case _ =>
})
+
+ // Check for unresolved TABLE arguments after the main check above to
allow other analysis
+ // errors to apply first, providing better error messages.
+ getAllExpressions(operator).foreach(_.foreachUp {
Review Comment:
Can we check this together with `
getAllExpressions(operator).foreach(_.foreachUp {` in line 290 so we don't need
to iterate the plan again?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -1058,9 +1069,7 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog with QueryErrorsB
checkCorrelationsInSubquery(expr.plan, isLateral = true)
case _: FunctionTableSubqueryArgumentExpression =>
- expr.failAnalysis(
- errorClass =
"UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY.UNSUPPORTED_TABLE_ARGUMENT",
- messageParameters = Map("treeNode" -> planToString(plan)))
+ // Do nothing here, since we will check for this pattern later.
Review Comment:
Shall we just remove this case?
--
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]