cloud-fan commented on code in PR #38864:
URL: https://github.com/apache/spark/pull/38864#discussion_r1043059500
##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala:
##########
@@ -667,6 +667,34 @@ class QueryCompilationErrorsSuite
errorClass = "DATATYPE_MISMATCH.INVALID_JSON_SCHEMA",
parameters = Map("schema" -> "\"INT\"", "sqlExpr" -> "\"from_json(a)\""))
}
+
+ test("UNBOUND_PARAMETER - SPARK-41271: non-substituted parameters") {
+ checkError(
+ exception = intercept[AnalysisException] {
+ spark.sql("select :abc, :def", Map("abc" -> "1"))
+ },
+ errorClass = "UNBOUND_PARAMETER",
+ parameters = Map("name" -> "def"),
+ context = ExpectedContext(
+ fragment = ":def",
+ start = 13,
+ stop = 16))
+ }
+
+ test("INVALID_SQL_ARG - SPARK-41271: non-literal argument of `sql()`") {
Review Comment:
can we put end-to-end tests in one place? either working cases or failing
cases.
--
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]