MaxGekk commented on code in PR #46880:
URL: https://github.com/apache/spark/pull/46880#discussion_r1716464204
##########
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:
This change can break existing user apps. I believe we should avoid such
kind of changes even in major release.
How about to correct the function description, and allow 1, 2 and 3
arguments? It seems there is no restriction from implementation perspective,
so, you can construct `new Locale(languageStr.toString)`
--
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]