Skip to content

feat(codecs): add support for decimal type#25048

Open
benjamin-awd wants to merge 1 commit intovectordotdev:masterfrom
benjamin-awd:add-decimal
Open

feat(codecs): add support for decimal type#25048
benjamin-awd wants to merge 1 commit intovectordotdev:masterfrom
benjamin-awd:add-decimal

Conversation

@benjamin-awd
Copy link
Copy Markdown
Contributor

Summary

This PR adds support for a new decimal type backed by the rust_decimal crate. Sibling VRL PR: vectordotdev/vrl#1719 (issue: vectordotdev/vrl#1692).

Note: this requires the VRL PR to be merged first.

This feature should be considered in beta, some additional work will have to be done in the future to wire up existing sinks to work with the decimal type.

Benchmark results:

Single-event results

Payload Baseline Decimal Precision Overhead
simple ~975 ns ~962 ns ~0% (noise)
numeric ~901 ns ~1,007 ns ~12%
high_precision ~716 ns ~782 ns ~9%
mixed ~1,396 ns ~1,651 ns ~18%

Batch results

Batch Size Baseline (thrpt) Decimal (thrpt) Overhead
100 92.8 MiB/s 77.4 MiB/s ~17%
1,000 92.7 MiB/s 84.2 MiB/s ~9%
10,000 98.9 MiB/s 83.6 MiB/s ~15%
100,000 101.2 MiB/s 84.1 MiB/s ~17%

Vector configuration

How did you test this PR?

Tests in VRL and Vector

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

This shouldn't have any breaking changes unless decimal parsing is enabled.

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

@benjamin-awd benjamin-awd requested a review from a team as a code owner March 26, 2026 05:08
@github-actions github-actions bot added domain: transforms Anything related to Vector's transform components domain: core Anything related to core crates i.e. vector-core, core-common, etc labels Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: transforms Anything related to Vector's transform components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant