jdesjean commented on code in PR #41748:
URL: https://github.com/apache/spark/pull/41748#discussion_r1259927245


##########
sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala:
##########
@@ -622,21 +622,43 @@ class SparkSession private(
    *             For example, 1, "Steven", LocalDate.of(2023, 4, 2).
    *             A value can be also a `Column` of literal expression, in that 
case
    *             it is taken as is.
+   * @param tracker A tracker that can notify when query is ready for execution
    *
    * @since 3.5.0
    */
   @Experimental
-  def sql(sqlText: String, args: Array[_]): DataFrame = withActive {
-    val tracker = new QueryPlanningTracker
-    val plan = tracker.measurePhase(QueryPlanningTracker.PARSING) {
-      val parsedPlan = sessionState.sqlParser.parsePlan(sqlText)
-      if (args.nonEmpty) {
-        PosParameterizedQuery(parsedPlan, args.map(lit(_).expr))
-      } else {
-        parsedPlan
+  private[sql] def sql(sqlText: String, args: Array[_], tracker: 
QueryPlanningTracker): DataFrame =

Review Comment:
   Connect uses both the [map & array parametrized 
form](https://github.com/apache/spark/blob/master/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala#L2333).
 I've dropped the java map & non parametrized sql



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to