-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spark] Support nested col pruning #4269
Conversation
c5711df
to
c0fdb15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there some configuration to disable nested projection? I am concern about bugs in nested projection, at least, we should have option to disable it.
yes, spark has a conf to enabled nestedSchemaPruning val NESTED_SCHEMA_PRUNING_ENABLED =
buildConf("spark.sql.optimizer.nestedSchemaPruning.enabled")
.internal()
.doc("Prune nested fields from a logical relation's output which are unnecessary in " +
"satisfying a query. This optimization allows columnar file format readers to avoid " +
"reading unnecessary nested column data. Currently Parquet and ORC are the " +
"data sources that implement this optimization.")
.version("2.4.1")
.booleanConf
.createWithDefault(true) |
String fieldName = field.name(); | ||
if (parquetGroup.containsField(fieldName)) { | ||
Type type = parquetGroup.getType(fieldName); | ||
if (type instanceof GroupType && field.type() instanceof RowType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can Spark push down nested fields for array and map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It support, update
c0fdb15
to
35e3fd0
Compare
35e3fd0
to
9fd330b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Purpose
to #4209, Support nested col pruning, e.g.
will only obtain
course.grade
from colume-storage-format (parquet, orc)Tests
API and Format
Documentation