You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/15 20:16:34 UTC

[GitHub] [spark] srielau commented on a diff in pull request #38864: [SPARK-41271][SQL] Support parameterized SQL queries by `sql()`

srielau commented on code in PR #38864:
URL: https://github.com/apache/spark/pull/38864#discussion_r1050094022


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -795,6 +795,11 @@
       }
     }
   },
+  "INVALID_SQL_ARG" : {
+    "message" : [
+      "The argument <name> of `sql()` is invalid. Consider to replace it by a SQL literal statement."

Review Comment:
   Can we more explicit about why it is invalid?
   "The argument <name> of `sql()` is not a literal." What is a "SQL Literal statement"?



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1130,6 +1135,11 @@
       "Unable to convert SQL type <toType> to Protobuf type <protobufType>."
     ]
   },
+  "UNBOUND_SQL_PARAMETER" : {
+    "message" : [
+      "Found the unbound parameter: <name>. Please, fix `args` and provide a mapping of the parameter to a SQL literal statement."

Review Comment:
   Won't this same error be used fro all other APIs (JDBC, SQL (when we support). So we may not want to refer to `args`.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org