Repository navigation
fix(external): rescale parquet decimals on load - #26212
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed the decimal rescale path end-to-end.
The new DECIMAL logical-type branch now resizes scale through the value path for both plain and dictionary pages, preserves the existing raw fast-path when source and target scales already match, and adds targeted coverage for scale up/down, overflow, and unsupported physical types. I did not find a high-confidence blocking correctness issue in this diff.
Merge Queue Status
This pull request spent 3 minutes 48 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #26212 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
Failing checks:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
I found one blocking correctness gap in the new decimal-dispatch logic.
- Same-scale DECIMAL loads still bypass target precision enforcement.
canUseRawDecimalMappingreturns true for any Parquet DECIMAL whose source scale already matches the target scale, so those values stay on the rawdecodeDecimal{64,128,256}Valuespath. That path only checks storage fit, not the destination column's declared DECIMAL precision. A ParquetDECIMAL(10,2)value like12345.67loaded into a targetDECIMAL(4,2)column would still be accepted instead of being rejected.
This is now wired directly into the new dispatcher (canUseRawDecimalMapping), so I think the safety decision should also consider target precision, not only scale. If precision cannot be proven safe, the logical DECIMAL path should go through the new precision-aware parquetDecimalValueToDecimal64/128/256 helpers even when the scales already match.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25473 ## What this PR does / why we need it: fix(external): rescale parquet decimals on load Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25473 ## What this PR does / why we need it: fix(external): rescale parquet decimals on load Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25473 ## What this PR does / why we need it: fix(external): rescale parquet decimals on load Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #25473
What this PR does / why we need it:
fix(external): rescale parquet decimals on load