Commit b8a2c1a
authored
[parquet] Avoid a clone while resolving the read strategy (#9056)
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax.
-->
- related to apache/datafusion#19477
# Rationale for this change
While working on apache/datafusion#19477, and
profiling ClickBench q7, I noticed that the RowSelectors was being
cloned to resolve the strategy -- for a large number of selections this
is expensive and shows up in the traces
<img width="1724" height="1074" alt="Screenshot 2025-12-28 at 4 49
49 PM"
src="https://github.com/user-attachments/assets/72c6fd22-9377-48ef-ba80-6bc03b177cf7"
/>
```shell
samply record -- ./datafusion-cli-alamb_enable_pushdown -f q.sql > /dev/null 2>&
```
We should change the code to avoid cloning the RowSelectors when
resolving the strategy.
# Changes
Don't clone / allocate while resolving the strategy.
I don't expect this to have a massive impact, but it did show up in the
profile
FYI @hhhizzz -- perhaps you could review this PR
# Are these changes tested?
Yes by CI
# Are there any user-facing changes?
small performance improvement1 parent 1ba902e commit b8a2c1a
1 file changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | | - | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
0 commit comments