beliefer commented on code in PR #7691:
URL: https://github.com/apache/incubator-gluten/pull/7691#discussion_r1820044663
##########
backends-clickhouse/src/main/scala/org/apache/gluten/extension/RewriteDateTimestampComparisonRule.scala:
##########
@@ -37,7 +37,7 @@ import org.apache.spark.unsafe.types.UTF8String
// This rule try to make the filter condition into integer comparison, which
is more efficient.
// The above example will be rewritten into
// select * from table where to_unixtime('2023-11-02', 'yyyy-MM-dd') >=
unix_timestamp
-class RewriteDateTimestampComparisonRule(session: SparkSession, conf: SQLConf)
Review Comment:
No. This PR doesn't avoid using `SQLConf.get` in Gluten.
In fact, `SQLConf.get` and `spark.sessionState.conf` are functionally
equivalent. But `spark.sessionState.conf` is faster than `SQLConf.get` because
the latter requires visit thread local. So we can see the usage scenarios:
1. The code rely on `SQLConfHelper` in Spark we can't find `SparkSession` in
context.
2. All the places in Spark rely on `spark.sessionState.conf` if exists
`SparkSession`.
--
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]