Skip to content

Remove unreachable timestamp-micros from LOGICAL_FIELD_TYPE_MAPPING - #4139

Open
Fokko wants to merge 1 commit into
apache:mainfrom
Fokko:fd-remove-dead-mapping
Open

Fokko wants to merge 1 commit into
apache:mainfrom
Fokko:fd-remove-dead-mapping

Conversation

@Fokko

@Fokko Fokko commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

timestamp-micros is handled by an explicit branch in _convert_logical_type`:

elif logical_type == "timestamp-micros":
if avro_logical_type.get("adjust-to-utc", False) is True:
return TimestamptzType()
else:
return TimestampType()

That also honors adjust-to-utc, so the mapping entry was never used.

Are these changes tested?

Are there any user-facing changes?

timestamp-micros is handled by an explicit branch in _convert_logical_type
that also honors adjust-to-utc, so the mapping entry was never used.
@Fokko
Fokko requested a review from kevinjqliu October 22, 2026 18:23

@rambleraptor rambleraptor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks great as a one-liner.

It looks like we need to have that same area in the code handle some of the other time related types (timestamp-millis and time-millis), but let's keep that to a follow-up

This branch has not been deployed

No deployments
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