andygrove commented on code in PR #4594:
URL: https://github.com/apache/datafusion-comet/pull/4594#discussion_r3399460673
##########
spark/src/main/scala/org/apache/comet/serde/strings.scala:
##########
@@ -84,6 +84,31 @@ object CometLength extends
CometScalarFunction[Length]("length") {
}
}
+object CometBitLength extends CometScalarFunction[BitLength]("bit_length") {
+ override def getUnsupportedReasons(): Seq[String] = Seq("`BinaryType` input
is not supported")
+
+ override def getSupportLevel(expr: BitLength): SupportLevel =
expr.child.dataType match {
+ case _: BinaryType => Unsupported(Some("bit_length on BinaryType is not
supported"))
+ case _ => Compatible()
+ }
+}
+
+object CometOctetLength extends
CometScalarFunction[OctetLength]("octet_length") {
+ override def getUnsupportedReasons(): Seq[String] = Seq("`BinaryType` input
is not supported")
+
+ override def getSupportLevel(expr: OctetLength): SupportLevel =
expr.child.dataType match {
+ case _: BinaryType => Unsupported(Some("octet_length on BinaryType is not
supported"))
+ case _ => Compatible()
+ }
+}
+
+object CometStringTranslate extends
CometScalarFunction[StringTranslate]("translate") {
+ override def getSupportLevel(expr: StringTranslate): SupportLevel =
Incompatible(
Review Comment:
Updated. Thanks for catching that.
--
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]