File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed
common/src/main/scala/org/apache/comet
main/scala/org/apache/comet/serde
test/scala/org/apache/spark/sql/comet Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -600,12 +600,6 @@ object CometConf extends ShimCometConf {
600600 .toSequence
601601 .createWithDefault(Seq (" Range,InMemoryTableScan" ))
602602
603- val COMET_IGNORE_ANSI_MODE : ConfigEntry [Boolean ] = conf(" spark.comet.ansi.ignore" )
604- .internal()
605- .doc(" Internal config to avoid falling back to Spark when ANSI is enabled. Used for testing." )
606- .booleanConf
607- .createWithDefault(false )
608-
609603 val COMET_CASE_CONVERSION_ENABLED : ConfigEntry [Boolean ] =
610604 conf(" spark.comet.caseConversion.enabled" )
611605 .doc(
@@ -630,6 +624,14 @@ object CometConf extends ShimCometConf {
630624 .booleanConf
631625 .createWithDefault(false )
632626
627+ val COMET_ANSI_EXPR_ALLOW_INCOMPATIBLE : ConfigEntry [Boolean ] =
628+ conf(" spark.comet.expression.allowIncompatibleAnsi" )
629+ .doc(
630+ " Comet is not currently fully compatible with Spark for all expressions in ANSI mode. " +
631+ s " Set this config to true to allow them anyway. $COMPAT_GUIDE. " )
632+ .booleanConf
633+ .createWithDefault(false )
634+
633635 val COMET_CAST_ALLOW_INCOMPATIBLE : ConfigEntry [Boolean ] =
634636 conf(" spark.comet.cast.allowIncompatible" )
635637 .doc(
Original file line number Diff line number Diff line change @@ -646,8 +646,12 @@ object QueryPlanSerde extends Logging with CometExprShim {
646646 handler match {
647647 case ansiExpr : IncompatAnsiExpr [T ]
648648 if ansiExpr
649- .isAnsiMode(expr.asInstanceOf [T ]) && ! CometConf .COMET_IGNORE_ANSI_MODE .get() =>
650- withInfo(expr, " ANSI mode not supported" )
649+ .isAnsiMode(expr.asInstanceOf [T ]) && ! CometConf .COMET_ANSI_EXPR_ALLOW_INCOMPATIBLE
650+ .get() =>
651+ withInfo(
652+ expr,
653+ s " $expr is not fully compatible with Spark in ANSI mode. To enable it anyway, set " +
654+ s " ${CometConf .COMET_ANSI_EXPR_ALLOW_INCOMPATIBLE .key}=true. ${CometConf .COMPAT_GUIDE }. " )
651655 None
652656
653657 case _ : IncompatExpr if ! CometConf .COMET_EXPR_ALLOW_INCOMPATIBLE .get() =>
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ trait CometPlanStabilitySuite extends DisableAdaptiveExecutionSuite with TPCDSBa
269269 CometConf .COMET_ENABLED .key -> " true" ,
270270 CometConf .COMET_NATIVE_SCAN_ENABLED .key -> " true" ,
271271 CometConf .COMET_EXEC_ENABLED .key -> " true" ,
272- CometConf .COMET_IGNORE_ANSI_MODE .key -> " true" ,
272+ CometConf .COMET_ANSI_EXPR_ALLOW_INCOMPATIBLE .key -> " true" ,
273273 CometConf .COMET_DPP_FALLBACK_ENABLED .key -> " false" ,
274274 SQLConf .DYNAMIC_PARTITION_PRUNING_ENABLED .key -> dppEnabled.toString,
275275 CometConf .COMET_EXEC_SHUFFLE_ENABLED .key -> " true" ,
You can’t perform that action at this time.
0 commit comments