dtenedor commented on code in PR #60736:
URL: https://github.com/apache/spark/pull/60736#discussion_r4646547354


##########
sql/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/SparkConnectClientSuite.scala:
##########
@@ -393,6 +394,72 @@ class SparkConnectClientSuite extends ConnectFunSuite {
     }
   }
 
+  test("ParseException keeps the server message for a condition the client 
does not define") {
+    val sqlContext = new QueryContext {
+      override def contextType(): QueryContextType = QueryContextType.SQL
+      override def objectType(): String = ""
+      override def objectName(): String = ""
+      override def startIndex(): Int = 0
+      override def stopIndex(): Int = 5
+      override def fragment(): String = "SELECT"
+      override def callSite(): String = ""
+      override def summary(): String = "== SQL (line 1, position 1) 
==\nSELECT\n^^^^^^\n"
+    }
+    Seq(
+      // A subcondition the client lacks, with a query context and the 
server's SQLSTATE.
+      (
+        "INVALID_SQL_SYNTAX.SUBCONDITION_NOT_DEFINED_BY_CLIENT",
+        Map("statement" -> "SELECT"),
+        Array(sqlContext),
+        Some("42000"),
+        "42000"),
+      // A main condition the client lacks, without a query context or 
SQLSTATE, as when only

Review Comment:
   Fixed in 4c681e9b963. The comment now attributes the missing SQLSTATE to a 
server condition that defines none, and I corrected the PR description the same 
way.
   



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