viirya commented on a change in pull request #28366:
URL: https://github.com/apache/spark/pull/28366#discussion_r418429172
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2063,16 +2063,17 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
- val NESTED_PREDICATE_PUSHDOWN_ENABLED =
- buildConf("spark.sql.optimizer.nestedPredicatePushdown.enabled")
- .internal()
- .doc("When true, Spark tries to push down predicates for nested columns
and or names " +
- "containing `dots` to data sources. Currently, Parquet implements both
optimizations " +
- "while ORC only supports predicates for names containing `dots`. The
other data sources" +
- "don't support this feature yet.")
+ val NESTED_PREDICATE_PUSHDOWN_V1_SOURCE_LIST =
+ buildConf("spark.sql.optimizer.nestedPredicatePushdown.v1sourceList")
+ .internal()
+ .doc("A comma-separated list of data source short names or fully
qualified data source " +
+ "implementation class names for which Spark tries to push down
predicates for nested " +
+ "columns and or names containing `dots` to data sources. Currently,
Parquet implements " +
+ "both optimizations while ORC only supports predicates for names
containing `dots`. The " +
+ "other data sources don't support this feature yet.")
.version("3.0.0")
- .booleanConf
- .createWithDefault(true)
+ .stringConf
Review comment:
We compare this list with `toLowerCase` when we need it. So seems to be
fine to leave it here. Another similar example is
`spark.sql.sources.useV1SourceList`. And as `useV1SourceList` too, seems
`checkValues` is not needed.
Currently I think it is safer to assume custom data sources don't support
this feature. I actually also think if custom data source wants to support it,
it is better to adapt data source v2.
We don't have a common API for v1 data sources that tells if it supports
nested predicate pushdown. If we really want to allow custom v1 data sources
have that, we can consider adding one common v1 API for the purpose. But,
again, seems to me that we will encourage adapting v2 instead adding new things
to v1.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]