MaxGekk commented on code in PR #49050:
URL: https://github.com/apache/spark/pull/49050#discussion_r1869332662


##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -1258,6 +1258,22 @@ class QueryExecutionErrorsSuite
       )
     )
   }
+
+  test("SPARK-50485: Unwrap SparkThrowable in UEE thrown by 
tableRelationCache") {
+    withTable("t") {
+      sql(s"CREATE TABLE t (a INT)")

Review Comment:
   s is not needed:
   ```suggestion
         sql("CREATE TABLE t (a INT)")
   ```



##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -1258,6 +1258,22 @@ class QueryExecutionErrorsSuite
       )
     )
   }
+
+  test("SPARK-50485: Unwrap SparkThrowable in UEE thrown by 
tableRelationCache") {
+    withTable("t") {
+      sql(s"CREATE TABLE t (a INT)")
+      checkError(
+        exception = intercept[SparkUnsupportedOperationException] {
+          sql(s"ALTER TABLE t SET LOCATION 'https://mister/spark'")

Review Comment:
   ```suggestion
             sql("ALTER TABLE t SET LOCATION 'https://mister/spark'")
   ```



##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -1258,6 +1258,22 @@ class QueryExecutionErrorsSuite
       )
     )
   }
+
+  test("SPARK-50485: Unwrap SparkThrowable in UEE thrown by 
tableRelationCache") {
+    withTable("t") {
+      sql(s"CREATE TABLE t (a INT)")
+      checkError(
+        exception = intercept[SparkUnsupportedOperationException] {
+          sql(s"ALTER TABLE t SET LOCATION 'https://mister/spark'")
+        },
+        condition = "FAILED_READ_FILE.UNSUPPORTED_FILE_SYSTEM",
+        parameters = Map(
+          "path" -> "https://mister/spark";,
+          "fileSystemClass" -> "org.apache.hadoop.fs.http.HttpsFileSystem",
+          "method" -> "listStatus"))
+      sql(s"ALTER TABLE t SET LOCATION '/mister/spark'")

Review Comment:
   ```suggestion
         sql("ALTER TABLE t SET LOCATION '/mister/spark'")
   ```



-- 
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]

Reply via email to