andygrove commented on code in PR #1349:
URL: https://github.com/apache/datafusion-comet/pull/1349#discussion_r1933045705
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -929,6 +929,17 @@ object QueryPlanSerde extends Logging with
ShimQueryPlanSerde with CometExprShim
binding: Boolean): Option[Expr] = {
SQLConf.get
+ def toProto(handler: CometExpressionSerde): Option[Expr] = {
+ if (handler.isIncompat &&
!CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.get()) {
+ withInfo(
+ expr,
+ s"$expr is not fully compatible with Spark. To enable it anyway, set
" +
+ s"${CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key}=true")
+ return None
+ }
Review Comment:
We no longer have to repeat this check and error message for each
expression, we can simply override the `isCompat` method instead,
Another option here would be to have expressions extend an additional
`IncompatExpr` trait, which may be better.
--
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]