Skip to content

feat(extensions): add fp16, decimal256, and duration extension types#978

Draft
kadinrabo wants to merge 17 commits intosubstrait-io:mainfrom
kadinrabo:feat/extension-types-numeric
Draft

feat(extensions): add fp16, decimal256, and duration extension types#978
kadinrabo wants to merge 17 commits intosubstrait-io:mainfrom
kadinrabo:feat/extension-types-numeric

Conversation

@kadinrabo
Copy link
Copy Markdown
Contributor

@kadinrabo kadinrabo commented Feb 27, 2026

Adds three numeric extension types as self-contained modules following the pattern from #953 (unsigned integers). Each file defines types with string structure encoding and arithmetic function overloads.

  • float16.yaml: fp16 with add, subtract, multiply, divide, sum, min, max
  • decimal256.yaml: decimal256<precision, scale> with add, subtract, multiply, divide, modulus, abs, sum, min, max, avg
  • duration.yaml: duration with add, subtract, sum, min, max

These types are already defined in Arrow's extension_types.yaml and are currently encoded in DataFusion via type_variation_reference, which violates the spec's "same semantics" requirement for type variations.

Depends on #953.


This change is Reviewable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the difference between duration and the interval_year / interval_day data types?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants