maomaodev opened a new pull request, #7436:
URL: https://github.com/apache/kyuubi/pull/7436
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://kyuubi.readthedocs.io/en/master/contributing/code/index.html
2. If the PR is related to an issue in
https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title,
e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g.,
'[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug, and what versions
are affected.
-->
Part 1 of 2 to add KSHC support for dynamic partition pruning (DPP). See
https://github.com/apache/kyuubi/issues/6943.
- [x] Add DPP support in HiveScan for non-Parquet/ORC tables.
- [ ] Add DPP support in ParquetScan / ORCScan for Parquet/ORC tables.
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some
test cases that check the changes thoroughly including negative and positive
cases if possible.
If it was tested in a way different from regular unit tests, please clarify
how you tested step by step, ideally copy and paste-able, so that other
reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why
it was difficult to add.
-->
1. Unit tests
2. Manual test: TPC-DS benchmark (11 GB text dataset).
- **Spark configuration used for the benchmark(Spark 3.5.7, Kyuubi
1.12.0-SNAPSHOT):**
```
spark.driver.cores 1
spark.driver.memory 4g
spark.executor.cores 1
spark.executor.instances 10
spark.executor.memory 4g
spark.master yarn
spark.shuffle.service.enabled true
spark.yarn.appMasterEnv.JAVA_HOME /usr/local/jdk-17
spark.executorEnv.JAVA_HOME /usr/local/jdk-17
```
- **Overall performance (sum of 99)**
| Dimension | Vanilla Spark | KSHC Before | KSHC Now |
| ----------------- | ------------: | ----------: | ----------: |
| Total time | 5427.47 s | 2775.26 s | 2574.12 s |
| vs. Vanilla Spark | — | **−48.87%** | **−52.57%** |
| vs. KSHC Before | — | — | **−7.25%** |
KSHC Now provides a 7.25% (~200 s) speedup over KSHC Before, with no
correctness regression.
- **DPP hit subset (70/99)**
DPP trigger was detected by matching `runtime partition filter` in the
driver logs.
```
3,4,5,6,7,8,10,11,12,13,14,15,17,18,19,20,23,25,26,27,29,30,31,32,33,
35,36,38,40,42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,63,64,65,
66,67,69,70,71,72,74,75,77,78,79,80,81,83,85,86,87,89,91,92,97,98
```
| Dimension | Vanilla Spark | KSHC Before | KSHC Now |
| ----------------- | ------------: | ----------: | ----------: |
| Subset total time | 3061.73 s | 2131.38 s | 1914.81 s |
| vs. Vanilla Spark | — | −30.39% | **−37.46%** |
| vs. KSHC Before | — | — | **−10.16%** |
On the DPP-hit subset, KSHC Now provides a 10.2% speedup over KSHC Before,
noticeably larger than the overall 7.25%, indicating the performance benefit
mainly comes from queries where DPP is triggered.
### Was this patch authored or co-authored using generative AI tooling?
<!--
If a generative AI tooling has been used in the process of authoring this
patch, please include
phrase 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
Partially assisted by Claude Code (Claude Opus 4.7) for unit test and
analysis of TPC-DS benchmark results. Core design and implementation are
human-authored.
--
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]