raviston commented on PR #60084:
URL: https://github.com/apache/spark/pull/60084#issuecomment-6813145181
Thank you @sunchao for the review and the repros, and thanks for the
automated review as well. I pushed 62f2c3e2484, which addresses all of them
(details in each thread):
- **Column lookup** (`ParquetUtils.getPushedDownAggResult`): it now matches
the reader in `ParquetReadSupport.clipParquetGroupFields`. That means one lazy
map per file of the top-level fields, groups included, keyed by the exact name
or by `toLowerCase(Locale.ROOT)`, with the same duplicate-field error. A group
with the column's name fails with
`FAILED_READ_FILE.PARQUET_COLUMN_DATA_TYPE_MISMATCH`. `COUNT(*)` no longer
builds the lookup.
- **Planning** (`ParquetScanBuilder.pushAggregation`):
- The field ID check reads the flag from the scan's Hadoop configuration,
which has the options of the read.
- Aggregates of a column with an existence default are no longer pushed
down.
- **Tests:** four new ones (Unicode names, group columns, case-sensitive
mode, existence defaults), and the existing ones are stronger. I checked that
each targeted branch makes its test fail when that branch is changed.
On ORC: thanks for pointing it out. I reproduced it on master. A file with
`x, a, b` read with the schema `b INT, a INT, z INT` gives `min(b) = 1`,
`count(z) = 2` and `max(z) = 200` with `spark.sql.orc.aggregatePushdown=true`,
against `100`, `0` and `NULL` without it. ORC matches columns by position for
Hive-style `_colN` files and with `orc.force.positional.evolution`, so it needs
its own rules and tests. I'll file a separate JIRA and fix it in a follow-up
PR, to keep this one to Parquet.
--
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]