You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2024/05/28 14:01:31 UTC
Re: [PR] fix: Fallback to Spark for LIKE with custom escape character [datafusion-comet]
andygrove commented on code in PR #478:
URL: https://github.com/apache/datafusion-comet/pull/478#discussion_r1617302738
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -981,7 +981,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde {
None
}
- case Like(left, right, _) =>
+ case Like(left, right, escapeChar) if escapeChar == '\\' =>
Review Comment:
I tihnk it would be better to have a check for escape char within the match and then call `withInfo` if the escape char is not `\\` so that we can give the user a specific error such as `escape char not supported` otherwise I think we fall through to the catchall logic and the user will get an error `like is not supported`, which could be confusing
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org