amaliujia commented on code in PR #40355:
URL: https://github.com/apache/spark/pull/40355#discussion_r1134331640


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -106,6 +106,37 @@ object functions {
       case _ => createLiteral(toLiteralProtoBuilder(literal))
     }
   }
+
+  /**
+   * Creates a [[Column]] of literal value.
+   *
+   * An alias of `typedlit`, and it is encouraged to use `typedlit` directly.
+   *
+   * @group normal_funcs
+   * @since 3.4.0
+   */
+  def typedLit[T: TypeTag](literal: T): Column = typedlit(literal)
+
+  /**
+   * Creates a [[Column]] of literal value.
+   *
+   * The passed in object is returned directly if it is already a [[Column]]. 
If the object is a
+   * Scala Symbol, it is converted into a [[Column]] also. Otherwise, a new 
[[Column]] is created
+   * to represent the literal value. The difference between this function and 
[[lit]] is that this
+   * function can handle parameterized scala types e.g.: List, Seq and Map.
+   *
+   * @note
+   *   `typedlit` will call expensive Scala reflection APIs. `lit` is 
preferred if parameterized
+   *   Scala types are not used.

Review Comment:
   Just for my self education: 
   
   is this still true for the case of Spark Connect?



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