zsxwing commented on a change in pull request #34901:
URL: https://github.com/apache/spark/pull/34901#discussion_r769143686
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -113,7 +113,17 @@ object functions {
* @group normal_funcs
* @since 1.3.0
*/
- def lit(literal: Any): Column = typedLit(literal)
+ def lit(literal: Any): Column = literal match {
+ case c: Column => c
Review comment:
Yep. I just inlined `typedlit(literal)` and changed
`Column(Literal.create(literal))` to `Column(Literal(literal))`. I don't expect
there is any behavior difference.
--
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]