itholic commented on code in PR #39723:
URL: https://github.com/apache/spark/pull/39723#discussion_r1086458494
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -797,6 +797,11 @@
],
"sqlState" : "42602"
},
+ "INVALID_IDENTIFIER_HAS_MORE_THAN_2_NAME_PARTS" : {
Review Comment:
Let's only use string for error class name.
BTW, maybe we can integrate it with `INVALID_IDENTIFIER` and reuse it ??
Or maybe `IDENTIFIER_TOO_MANY_NAME_PARTS` similar to
`TEMP_VIEW_NAME_TOO_MANY_NAME_PARTS` ?
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalogSuite.scala:
##########
@@ -1119,4 +1119,40 @@ class V2SessionCatalogNamespaceSuite extends
V2SessionCatalogBaseSuite {
}
catalog.dropNamespace(testNs, cascade = false)
}
+
+ test("IdentifierHelper should throw exception when identifier has more than
2 parts") {
+ val testIdent: IdentifierHelper = Identifier.of(Array("a", "b"), "c")
Review Comment:
Can we have a test with examples of queries that users might actually use,
such as SQL tests?
It would be great if we have a test in
`sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala`
if possible.
--
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]