You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "grundprinzip (via GitHub)" <gi...@apache.org> on 2023/04/04 02:19:21 UTC

[GitHub] [spark] grundprinzip commented on a diff in pull request #40623: [SPARK-43009][SQL] Parameterized `sql()` with `Any` constants

grundprinzip commented on code in PR #40623:
URL: https://github.com/apache/spark/pull/40623#discussion_r1156647732


##########
connector/connect/common/src/main/protobuf/spark/connect/commands.proto:
##########
@@ -53,11 +53,8 @@ message SqlCommand {
   // (Required) SQL Query.
   string sql = 1;
 
-  // (Optional) A map of parameter names to string values that are parsed as
-  // SQL literal expressions. For example, map keys: "rank", "name", "birthdate";
-  // map values: "1", "'Steven'", "DATE'2023-03-21'". The fragments of string values
-  // belonged to SQL comments are skipped while parsing.
-  map<string, string> args = 2;
+  // (Optional) A map of parameter names to literal expressions.
+  map<string, Expression.Literal> args = 2;

Review Comment:
   No, this is an incomatible change.



##########
connector/connect/common/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -108,11 +108,8 @@ message SQL {
   // (Required) The SQL query.
   string query = 1;
 
-  // (Optional) A map of parameter names to string values that are parsed as
-  // SQL literal expressions. For example, map keys: "rank", "name", "birthdate";
-  // map values: "1", "'Steven'", "DATE'2023-03-21'". The fragments of string values
-  // belonged to SQL comments are skipped while parsing.
-  map<string, string> args = 2;
+  // (Optional) A map of parameter names to literal expressions.
+  map<string, Expression.Literal> args = 2;

Review Comment:
   Same



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