Skip to content

feat: preserve Arrow Date(MILLISECOND) columns through Spark roundtrip#464

Open
summaryzb wants to merge 1 commit intolance-format:mainfrom
summaryzb:date_type
Open

feat: preserve Arrow Date(MILLISECOND) columns through Spark roundtrip#464
summaryzb wants to merge 1 commit intolance-format:mainfrom
summaryzb:date_type

Conversation

@summaryzb
Copy link
Copy Markdown
Contributor

Preserve Arrow Date(MILLISECOND) columns through Spark read-write roundtrips by carrying the original Arrow date unit in Spark field metadata. Without this change, Lance datasets created by PyArrow or other non-Spark sources that use Date(MILLISECOND) would silently downgrade to Date(DAY) when written back through Spark, corrupting interoperability with downstream consumers that expect millisecond-unit dates.

Change-Id: I832408fa941c1ebdf59a61307bfcda4e183ba64f
@github-actions github-actions Bot added the enhancement New feature or request label Apr 21, 2026
Copy link
Copy Markdown
Collaborator

@hamersaw hamersaw left a comment

Choose a reason for hiding this comment

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

Looks great! Lets just turn the TODO's into github issues and fix the integration tests then it will be ready to merge!

Comment on lines +119 to +121
// TODO: Date(MILLISECOND), FixedSizeList, and LargeUtf8 metadata is lost for array
// elements because fromArrowField returns DataType without metadata. Track as a
// known limitation; address in a follow-up.
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.

Can you make sure there is a ticket for this?

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.

And when it exists, lets remove the TODO comments. The captured ticket should be enough to remind us this needs to be fixed.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants