comphead commented on code in PR #4676:
URL: https://github.com/apache/datafusion-comet/pull/4676#discussion_r3436874088


##########
spark/src/main/scala/org/apache/comet/serde/strings.scala:
##########
@@ -324,22 +341,23 @@ object CometConcatWs extends 
CometExpressionSerde[ConcatWs] {
 
 object CometLike extends CometExpressionSerde[Like] {
 
-  override def convert(expr: Like, inputs: Seq[Attribute], binding: Boolean): 
Option[Expr] = {
+  override def getSupportLevel(expr: Like): SupportLevel = {
     if (expr.escapeChar == '\\') {
-      createBinaryExpr(
-        expr,
-        expr.left,
-        expr.right,
-        inputs,
-        binding,
-        (builder, binaryExpr) => builder.setLike(binaryExpr))
+      Compatible()
     } else {
-      withFallbackReason(
-        expr,
-        s"custom escape character ${expr.escapeChar} not supported in LIKE")
-      None
+      Unsupported(Some(s"custom escape character ${expr.escapeChar} not 
supported in LIKE"))
     }
   }
+
+  override def convert(expr: Like, inputs: Seq[Attribute], binding: Boolean): 
Option[Expr] = {

Review Comment:
   maybe one day we should rename this method,it confuses me sometimes what is 
this conversion, is it expression rewrite, simplification, etc



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