amaliujia commented on code in PR #53133:
URL: https://github.com/apache/spark/pull/53133#discussion_r2543117544
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -340,6 +340,12 @@ trait CheckAnalysis extends LookupCatalog with
QueryErrorsBase with PlanToString
errorClass = "UNSUPPORTED_FEATURE.OVERWRITE_BY_SUBQUERY",
messageParameters = Map.empty)
+ case p: PlanWithUnresolvedIdentifier if !p.identifierExpr.resolved =>
+ p.identifierExpr.failAnalysis(
+ errorClass = "NOT_A_CONSTANT_STRING.NOT_CONSTANT",
Review Comment:
I am wondering if we can have better error message. Per my understanding the
IDENTIFIER can take:
- relation (table or view) name
- function name
- column name
- field name
- schema name
- catalog name
The error `NOT_A_CONSTANT_STRING.NOT_CONSTANT` is too general as `which is
not a constant expression whose equivalent value is known at query planning
time.`
Because this is a very specific scenario, I am thinking if we can create a
new error message to say `xxx is not table, view, function, column, field,
schema or catalog name`
--
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]