Zouxxyy commented on code in PR #50495: URL: https://github.com/apache/spark/pull/50495#discussion_r2025873723
########## sql/core/src/test/resources/sql-tests/analyzer-results/identifier-clause.sql.out: ########## @@ -850,10 +850,11 @@ VALUES(IDENTIFIER('a.b.c.d')()) -- !query analysis org.apache.spark.sql.AnalysisException { - "errorClass" : "IDENTIFIER_TOO_MANY_NAME_PARTS", - "sqlState" : "42601", + "errorClass" : "REQUIRES_SINGLE_PART_NAMESPACE", Review Comment: The reason for modifying these two golden files is that: when using V2SessionCatalog, `ident.asFunctionIdentifier` was used previously, which would throw the exception `IDENTIFIER_TOO_MANY_NAME_PARTS`. After modification, it follows the V2 logic, which trying `catalog.asFunctionCatalog` firstly and throwing the V2 exception `REQUIRES_SINGLE_PART_NAMESPACE`. The meanings of the two are actually similar, but the latter behavior is more reasonable, as exemplified by lines 757-767. ``` -- !query CREATE TABLE IDENTIFIER('a.b.c')(c1 INT) USING csv -- !query analysis org.apache.spark.sql.AnalysisException { "errorClass" : "REQUIRES_SINGLE_PART_NAMESPACE", "sqlState" : "42K05", "messageParameters" : { "namespace" : "`a`.`b`", "sessionCatalog" : "spark_catalog" } } ``` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org