codope opened a new pull request, #7527:
URL: https://github.com/apache/hudi/pull/7527
### Change Logs
Fetching virtual key involved reading from commit metadata or data file
(`TableSchemaResolver`) which is a costly operation. This is only needed for
schema projection in the case of MOR table (realtime splits). So, we can avoid
it in case of COW table.
### Impact
Improves performance of hive-compatible query engines that depend on input
format implementation in Hudi, e.g. trino-hive connector. Tested listing on a
TPC-DS table with 1824 partitions.
Without this change (1.5 minutes):
```
trino:default> select count(*) from store_sales;
_col0
---------
2750311
(1 row)
Query 20221221_054403_00003_t63mx, FINISHED, 1 node
Splits: 1,832 total, 1,832 done (100.00%)
1:29 [2.75M rows, 28.5MB] [30.8K rows/s, 327KB/s]
```
With this change (18 seconds):
```
trino:default> select count(*) from store_sales;
_col0
---------
2750311
(1 row)
Query 20221221_055625_00002_knx5g, FINISHED, 1 node
Splits: 1,832 total, 1,832 done (100.00%)
17.30 [2.75M rows, 28.5MB] [169K rows/s, 1.75MB/s]
```
### Risk level (write none, low medium or high below)
medium
### Documentation Update
_Describe any necessary documentation update if there is any new feature,
config, or user-facing change_
- _The config description must be updated if new configs are added or the
default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website.
Please create a Jira ticket, attach the
ticket number here and follow the
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to
make
changes to the website._
### Contributor's checklist
- [ ] Read through [contributor's
guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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]