You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2025/09/11 17:35:42 UTC
Re: [PR] feat: Add dynamic `enabled` and `allowIncompat` configs for all supported expressions [datafusion-comet]
comphead commented on code in PR #2329:
URL: https://github.com/apache/datafusion-comet/pull/2329#discussion_r2341884546
##########
common/src/main/scala/org/apache/comet/CometConf.scala:
##########
@@ -664,6 +664,29 @@ object CometConf extends ShimCometConf {
.booleanConf
.createWithDefault(defaultValue)
}
+
+ def isExprEnabled(name: String, conf: SQLConf = SQLConf.get): Boolean = {
+ val key = getExprEnabledConfigKey(name)
+ // all expressions are enabled by default
+ if (conf.contains(key)) {
+ conf.getConfString(key) == "true"
+ } else {
+ true
+ }
+ }
Review Comment:
```suggestion
def isExprEnabled(name: String, conf: SQLConf = SQLConf.get): Boolean = {
val key = getExprEnabledConfigKey(name)
conf.getConfString(key, "true").toLowerCase match {
case "false" => false
case _ => true
}
}
```
--
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