liujiayi771 commented on code in PR #10093:
URL:
https://github.com/apache/incubator-gluten/pull/10093#discussion_r2179847710
##########
gluten-core/src/main/scala/org/apache/spark/sql/internal/SparkConfigUtil.scala:
##########
@@ -50,15 +50,15 @@ object SparkConfigUtil {
}
def get[T](conf: SparkConf, entry: ConfigEntry[T]): T = {
- entry.valueConverter(conf.get(entry.key, entry.defaultValueString))
+ entry.valueConverter(checkUndefined(conf.get(entry.key,
entry.defaultValueString)))
Review Comment:
@yaooqinn Should we also apply `entry.valueConverter` to the defaultValue?
So it will be
```scala
entry.valueConverter(
conf
.getOption(entry.key)
.getOrElse(entry.stringConverter(entry.defaultValue.getOrElse(None).asInstanceOf[T])))
```
or
```scala
entry.valueConverter(
conf
.getOption(entry.key)
.getOrElse(checkUndefined(entry.defaultValueString)))
```
And for `conf: java.util.Map[String, String]`, it will be
```scala
entry.valueConverter(
Option(conf.get(entry.key))
.getOrElse(checkUndefined(entry.defaultValueString)))
```
What do you think?
--
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]