comphead opened a new pull request, #7044: URL: https://github.com/apache/datafusion-comet/pull/7044
## Which issue does this PR close? No issue filed. Related: #6467 was found with this benchmark. ## Rationale for this change TPC-H is flat. All eight tables are normalized and every column is primitive. Real-world data is usually nested (event logs, JSON/Avro/Protobuf records, data lake tables), and nested column pruning, struct field access and array unnesting are hot paths there. The existing TPC-H derived benchmarks exercise none of them. This adds a nested variant that keeps the TPC-H data and queries and changes only the shape, so Comet's nested-type support can be benchmarked and compared against Spark on the same data. ## What changes are included in this PR? - `benchmarks/nested/scripts/nest_tpch.scala`: a `spark-shell -i` script that converts existing flat TPC-H data (Parquet or Iceberg, either direction) into the nested layout. Join keys and partition columns (`p_brand`, `c_mktsegment`, `o_orderdate`, `l_shipdate`) stay at the top level. All other columns move into a single-element `<table>_data: array<struct<...>>`. Spark is used for the conversion because the data can reach about 10 TB at SF10000. - `benchmarks/nested/queries/q01..q22.sql`: the queries rewritten for the nested schema. Each one unnests the arrays it needs with `explode`. The arrays hold exactly one element, so the results are identical to the flat queries. - `benchmarks/nested/README.md`: motivation, schema, usage. - `dev/release/rat_exclude_files.txt`: exclude the derived queries, like `benchmarks/tpc/queries`. ## How are these changes tested? Tested manually, since this is benchmark tooling and not part of the build: - Ran the conversion on Spark 3.5.5 with Iceberg 1.8.1 in all four directions: Parquet to Parquet, Parquet to Iceberg, Iceberg to Parquet and Iceberg to Iceberg. Ran Parquet to Parquet on Spark 4.1.1. - Ran all 22 nested queries on the nested output and the flat queries on the flat input, and compared the results. They matched for every query. The data was a small, TPC-H shaped local sample, not dbgen output. -- 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]
