MaxGekk commented on code in PR #39723:
URL: https://github.com/apache/spark/pull/39723#discussion_r1095926141
##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala:
##########
@@ -679,6 +680,40 @@ class QueryCompilationErrorsSuite
context = ExpectedContext("", "", 7, 13, "CAST(1)")
)
}
+
+ test("IDENTIFIER_TOO_MANY_NAME_PARTS: " +
+ "create temp view doesn't support identifiers consisting of more than 2
parts") {
+ checkError(
+ exception = intercept[ParseException] {
+ sql("CREATE TEMPORARY VIEW db_name.schema_name.view_name AS SELECT '1'
as test_column")
Review Comment:
Will the view exist after the test? If so, could you wrap the fragment by
`withTempView()`.
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/V2SessionCatalogSuite.scala:
##########
@@ -1119,4 +1119,32 @@ class V2SessionCatalogNamespaceSuite extends
V2SessionCatalogBaseSuite {
}
catalog.dropNamespace(testNs, cascade = false)
}
+
+ test("IdentifierHelper should throw exception when identifier has more than
2 parts") {
Review Comment:
Don't this test and below duplicate the test in
QueryCompilationErrorsSuite.scala?
##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -2673,4 +2673,23 @@ class JDBCV2Suite extends QueryTest with
SharedSparkSession with ExplainSuiteHel
val indexes3 = jdbcTable.listIndexes()
assert(indexes3.isEmpty)
}
+
+ test("IDENTIFIER_TOO_MANY_NAME_PARTS: " +
Review Comment:
Does the test improve the test coverage additionally to
QueryCompilationErrorsSuite.scala?
--
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]