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


##########
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
+  def sql(sqlText: String, args: Array[_], tracker: QueryPlanningTracker): 
DataFrame =

Review Comment:
   Looking at these new methods, I don't think that they offer a lot of benefit 
to outside callers and they are not easy to use. can we make these new methods 
that have been added `private[sql]`?
   
   @HyukjinKwon @juliuszsompolski what do you think?



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