Skip to content

mean() for decimals#8649

Open
myrrc wants to merge 1 commit into
developfrom
myrrc/decimal-mean
Open

mean() for decimals#8649
myrrc wants to merge 1 commit into
developfrom
myrrc/decimal-mean

Conversation

@myrrc

@myrrc myrrc commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Support mean() for decimals. Support casting decimals to f64.

Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
@myrrc myrrc requested review from a team and robert3005 July 3, 2026 10:20
@myrrc myrrc added the changelog/feature A new feature label Jul 3, 2026
@myrrc myrrc enabled auto-merge (squash) July 3, 2026 10:23
@codspeed-hq

codspeed-hq Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 21.05%

⚠️ 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.

⚡ 7 improved benchmarks
❌ 1 regressed benchmark
✅ 1589 untouched benchmarks
⏩ 4 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_varbinview_into_canonical[(100, 100)] 272.2 µs 306.7 µs -11.27%
Simulation chunked_bool_canonical_into[(1000, 10)] 26.8 µs 16.3 µs +64%
Simulation bitwise_not_vortex_buffer_mut[128] 273.6 ns 215.3 ns +27.1%
Simulation chunked_varbinview_opt_canonical_into[(1000, 10)] 206.4 µs 169.7 µs +21.68%
Simulation chunked_varbinview_into_canonical[(1000, 10)] 205.9 µs 169.2 µs +21.64%
Simulation bitwise_not_vortex_buffer_mut[1024] 333.9 ns 275.6 ns +21.17%
Simulation chunked_varbinview_opt_into_canonical[(1000, 10)] 219.9 µs 183.2 µs +20%
Simulation bitwise_not_vortex_buffer_mut[2048] 427.8 ns 369.4 ns +15.79%

Tip

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


Comparing myrrc/decimal-mean (92daf52) with develop (ee2cd67)

Open in CodSpeed

Footnotes

  1. 4 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.

DType::Decimal(..) => sum.dtype().with_nullability(Nullability::Nullable),
_ => DType::Primitive(PType::F64, Nullability::Nullable),
};
let target = DType::Primitive(PType::F64, Nullability::Nullable);

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.

should decimal mean be f64 as well? The code previously kept them decimals, I think they should stay decimals

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hm, okay, that makes sense, I'll rewrite to keep mean as decimal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants