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


##########
sql/core/src/test/scala/org/apache/spark/sql/ParametersSuite.scala:
##########
@@ -715,4 +715,30 @@ class ParametersSuite extends QueryTest with 
SharedSparkSession with PlanTest {
     spark.sessionState.analyzer.executeAndCheck(analyzedPlan, 
df.queryExecution.tracker)
     checkAnswer(df, Row(11))
   }
+
+  test("SPARK-49398: Cache Table with parameter markers in select query should 
throw " +
+    "UNSUPPORTED_FEATURE.PARAMETER_MARKER_IN_UNEXPECTED_STATEMENT") {
+    val sqlText = "CACHE TABLE CacheTable as SELECT 1 + :param1"
+    checkError(
+      exception = intercept[AnalysisException] {
+        spark.sql(sqlText, Map("param1" -> "1")).show()
+      },
+      errorClass = 
"UNSUPPORTED_FEATURE.PARAMETER_MARKER_IN_UNEXPECTED_STATEMENT",

Review Comment:
   @mikhailnik-db Please, rebase on the recent master and fix this test.



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