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/06 07:29:04 UTC

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

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


##########
sql/core/src/test/java/test/org/apache/spark/sql/JavaSparkSessionSuite.java:
##########
@@ -54,4 +55,19 @@ public void config() {
       Assert.assertEquals(spark.conf().get(e.getKey()), e.getValue().toString());
     }
   }
+
+  @Test
+  public void sqlParameters() {
+    spark = SparkSession.builder().master("local[*]").appName("testing").getOrCreate();
+    Map params = new HashMap();
+    params.put("_i1", "INTERVAL '1-1' YEAR TO MONTH");
+    params.put("p2", "'abc'");

Review Comment:
   Could you add a test case where the string literal contains a double quote? 



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