AnuragKDwivedi commented on code in PR #56732:
URL: https://github.com/apache/spark/pull/56732#discussion_r3479625411
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:
##########
@@ -1697,6 +1697,15 @@ class SQLQuerySuite extends SharedSparkSession with
AdaptiveSparkPlanHelper
}
assert(e.message.contains("Unsupported data source type for direct query
on files: " +
"org.apache.spark.sql.execution.datasources.jdbc"))
+
+ // Test for empty and whitespace-only paths
+ Seq("", " ", "\t", "\n", "\t\n", " \t ").foreach { location =>
+ val e = intercept[AnalysisException] {
+ sql(s"select id from json.`$location`")
+ }
+ assert(e.message.contains("The location name cannot be empty string"))
Review Comment:
Thanks for the suggestion, I have updated the test now. please take a look
again
--
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]