panbingkun commented on code in PR #46880:
URL: https://github.com/apache/spark/pull/46880#discussion_r1732213235


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -3345,39 +3345,51 @@ case class FormatNumber(x: Expression, d: Expression)
   group = "string_funcs")
 case class Sentences(
     str: Expression,
-    language: Expression = Literal(""),
-    country: Expression = Literal(""))
-  extends TernaryExpression with ImplicitCastInputTypes with CodegenFallback {
+    language: Option[Expression] = None,
+    country: Option[Expression] = None)
+  extends Expression with ImplicitCastInputTypes {
+
+  def this(str: Expression) = this(str, None, None)
 
-  def this(str: Expression) = this(str, Literal(""), Literal(""))
-  def this(str: Expression, language: Expression) = this(str, language, 
Literal(""))

Review Comment:
   Sorry, I missed this message.
   Do we need to add function like this (`def sentences(string: Column, 
language: Column): Column`) in `functions.scala`? This looks consistent.



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