This is an automated email from the ASF dual-hosted git repository.
felixybw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 59d99f577d [MINOR] expressionBlacklist should follows scala style.
(#10688)
59d99f577d is described below
commit 59d99f577dc60e680ca168aeb4b6d9c95299b98e
Author: Jiaan Geng <[email protected]>
AuthorDate: Sat Sep 13 15:38:24 2025 +0800
[MINOR] expressionBlacklist should follows scala style. (#10688)
This PR proposes to improve expressionBlacklist for GlutenConfig and make
expressionBlacklist follows Scala style.
---
.../scala/org/apache/gluten/config/GlutenConfig.scala | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git
a/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
b/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
index fef1d85986..c8c80e0901 100644
---
a/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
+++
b/gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala
@@ -273,16 +273,17 @@ class GlutenConfig(conf: SQLConf) extends
GlutenCoreConfig(conf) {
def extendedExpressionTransformer: String =
getConf(EXTENDED_EXPRESSION_TRAN_CONF)
def expressionBlacklist: Set[String] = {
- val blacklist = getConf(EXPRESSION_BLACK_LIST)
- val blacklistSet: Set[String] = if (blacklist.isDefined) {
- blacklist.get.toLowerCase(Locale.ROOT).trim.split(",").toSet
- } else {
- Set.empty
- }
+ val blacklistSet = getConf(EXPRESSION_BLACK_LIST)
+
.map(_.toLowerCase(Locale.ROOT).split(",").map(_.trim()).filter(_.nonEmpty).toSet)
+ .getOrElse(Set.empty[String])
if (getConf(FALLBACK_REGEXP_EXPRESSIONS)) {
- val regexpList =
"rlike,regexp_replace,regexp_extract,regexp_extract_all,split"
- regexpList.trim.split(",").toSet ++ blacklistSet
+ blacklistSet ++ Set(
+ "rlike",
+ "regexp_replace",
+ "regexp_extract",
+ "regexp_extract_all",
+ "split")
} else {
blacklistSet
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]