Skip to content

Add helper functions to create LogicalType struct variants#9996

Merged
alamb merged 7 commits into
apache:mainfrom
etseidl:logical_helpers
May 20, 2026
Merged

Add helper functions to create LogicalType struct variants#9996
alamb merged 7 commits into
apache:mainfrom
etseidl:logical_helpers

Conversation

@etseidl
Copy link
Copy Markdown
Contributor

@etseidl etseidl commented May 18, 2026

Which issue does this PR close?

Rationale for this change

Before switching LogicalType from struct variants to tuple variants, add some helper functions that will hide some of the increase in complexity.

What changes are included in this PR?

Adds functions to the LogicalType impl for creating instances of the non-unit variants (Integer, Decimal, Time, Timestamp, Variant, Geometry, Geography).

Are these changes tested?

Should be covered by existing tests.

Are there any user-facing changes?

Adds to the LogicalType API

@github-actions github-actions Bot added parquet Changes to the parquet crate parquet-derive labels May 18, 2026
@jhorstmann
Copy link
Copy Markdown
Contributor

Looks good to me, nice to have fewer places to spell out is_adjusted_to_u_t_c :)

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

The new pattern looks good to me -- thanks @etseidl and @jhorstmann

@alamb alamb merged commit e7c37de into apache:main May 20, 2026
16 checks passed
@etseidl etseidl deleted the logical_helpers branch May 20, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate parquet-derive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants