Skip to content

Decimal arithmetic dtypes and widening rescale cast#8343

Open
gatesn wants to merge 2 commits into
developfrom
ngates/decimal-arithmetic-dtypes
Open

Decimal arithmetic dtypes and widening rescale cast#8343
gatesn wants to merge 2 commits into
developfrom
ngates/decimal-arithmetic-dtypes

Conversation

@gatesn

@gatesn gatesn commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Binary::return_dtype derives Hive-style result types for decimal + - * / (mirroring arrow-arith's execution-time rules, with precision saturation at the physical width), instead of erroring at plan time. The decimal cast kernel gains widening rescale so expression coercion can align decimal operand types.

Binary::return_dtype derives Hive-style result types for decimal
+ - * / (mirroring arrow-arith's execution-time rules, with precision
saturation at the physical width), instead of erroring at plan time.
The decimal cast kernel gains widening rescale so expression coercion
can align decimal operand types.

Needed by vortex-engine for TPC-H Q1/Q6 decimal expressions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn requested a review from AdamGS June 10, 2026 20:07
@gatesn gatesn added the changelog/fix A bug fix label Jun 10, 2026
@gatesn gatesn marked this pull request as ready for review June 10, 2026 20:07
@gatesn gatesn requested a review from a team June 10, 2026 20:07
@gatesn gatesn enabled auto-merge (squash) June 10, 2026 20:07
@codspeed-hq

codspeed-hq Bot commented Jun 10, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.63%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 2 improved benchmarks
❌ 5 regressed benchmarks
✅ 1521 untouched benchmarks
⏩ 10 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_bool_canonical_into[(1000, 10)] 20.7 µs 35.4 µs -41.66%
Simulation chunked_varbinview_canonical_into[(1000, 10)] 161.9 µs 198 µs -18.24%
Simulation chunked_varbinview_into_canonical[(1000, 10)] 177.1 µs 213.2 µs -16.89%
Simulation decompress_rd[f64, (100000, 0.01)] 845.9 µs 980.8 µs -13.75%
Simulation decompress_rd[f64, (100000, 0.1)] 845.9 µs 980.7 µs -13.75%
Simulation decompress_rd[f64, (100000, 0.0)] 1,024.6 µs 845 µs +21.25%
Simulation decompress_rd[f32, (100000, 0.0)] 586.8 µs 498.6 µs +17.68%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ngates/decimal-arithmetic-dtypes (9257307) with develop (31167ca)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@AdamGS AdamGS self-assigned this Jun 10, 2026

@joseph-isaacs joseph-isaacs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very slow?

Comment thread vortex-array/src/arrays/decimal/compute/cast.rs Outdated
Comment thread vortex-array/src/scalar_fn/fns/binary/mod.rs Outdated
Comment thread vortex-array/src/scalar_fn/fns/binary/mod.rs Outdated
Signed-off-by: "Nicholas Gates" <nick@nickgates.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants