comphead commented on code in PR #2329:
URL: https://github.com/apache/datafusion-comet/pull/2329#discussion_r2341888077
##########
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
+ }
+ }
+
+ def getExprEnabledConfigKey(name: String): String = {
+ s"${CometConf.COMET_EXPR_CONFIG_PREFIX}.$name.enabled"
+ }
+
+ def isExprAllowIncompat(name: String, conf: SQLConf = SQLConf.get): Boolean
= {
+ val key = getExprAllowIncompatConfigKey(name)
+ conf.contains(key) && conf.getConfString(key) == "true"
+ }
Review Comment:
```suggestion
def isExprAllowIncompat(name: String, conf: SQLConf = SQLConf.get):
Boolean = {
isExprEnabled(name)
}
```
?
--
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]