YutaLin commented on code in PR #4315:
URL: https://github.com/apache/datafusion-comet/pull/4315#discussion_r3263536000
##########
spark/src/main/scala/org/apache/comet/serde/strings.scala:
##########
@@ -495,4 +495,33 @@ trait CommonStringExprs {
None
}
}
+
+ def stringEncode(
+ expr: Expression,
+ charset: Expression,
+ value: Expression,
+ inputs: Seq[Attribute],
+ binding: Boolean): Option[Expr] = {
+ charset match {
+ case Literal(str, DataTypes.StringType)
+ if str != null && str.toString.toLowerCase(Locale.ROOT) == "utf-8" =>
Review Comment:
The StandardCharsets.UTF_8.equals(Charset.forName(str)) would include
"utf-8", "UTF-8", "utf8" and "UTF8", but last two one are not supported in
Spark4.0. I'd suggest we keep current comparison.
--
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]