Skip to content

ARROW-701: [Java] Support Additional Date Type Metadata - #431

Closed
BryanCutler wants to merge 1 commit into
apache:masterfrom
BryanCutler:java-date_unit-metadata-ARROW-701
Closed

BryanCutler wants to merge 1 commit into
apache:masterfrom
BryanCutler:java-date_unit-metadata-ARROW-701

Conversation

@BryanCutler

Copy link
Copy Markdown
Member

The format for Date type now includes metadata for units as DAYS or MILLISECONDS. This change adds DateUnit and support for usage in metadata. Includes round-trip JSON testing.

@BryanCutler

Copy link
Copy Markdown
Member Author

@julienledem , this allows to use Date with a DAYS unit, but does not change the physical storage to 32-bit. Is that planned soon or do we need to forbid using DAYS as the unit for now?

@BryanCutler

Copy link
Copy Markdown
Member Author

ping @julienledem @wesm does this seem ok to you?

@wesm

wesm commented Mar 27, 2017

Copy link
Copy Markdown
Member

Seems like we're kicking the can a bit to not implement support for both kinds of dates. I'll have an integration test fixture available for both units this week (and the ability to emit from C++), so we can do the work in this patch, or do it in a follow up patch. Up to you

@BryanCutler

Copy link
Copy Markdown
Member Author

@wesm I'm not quite sure what it would take to change DateVector to support both kinds of dates, but the metadata was pretty straightforward which is why I only did that. If it's a simple change I could add it here, otherwise maybe a follow up patch would be best.

@wesm

wesm commented Mar 28, 2017

Copy link
Copy Markdown
Member

OK, @julienledem? I completed the C++ side in #446 today, so we need to bring Java up to spec so we can run the integration tests (which may expose some more problems)

@julienledem julienledem left a comment

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.

LGTM.
I'm happy with merging this patch and add the vector as a follow up.
To add the other units you need to add to this file:
https://github.com/apache/arrow/blob/master/java/vector/src/main/codegen/data/ValueVectorTypes.tdd

@asfgit asfgit closed this in dac648d Mar 28, 2017
@BryanCutler

Copy link
Copy Markdown
Member Author

Thanks @julienledem! So would you recommend just adding another FixedValueVector with a width of 4 to handle units as days? Maybe called Date32?

@BryanCutler
BryanCutler deleted the java-date_unit-metadata-ARROW-701 branch November 7, 2017 23:55
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
The format for Date type now includes metadata for units as DAYS or MILLISECONDS.  This change adds DateUnit and support for usage in metadata.  Includes round-trip JSON testing.

Author: Bryan Cutler <cutlerb@gmail.com>

Closes apache#431 from BryanCutler/java-date_unit-metadata-ARROW-701 and squashes the following commits:

cdbcbfd [Bryan Cutler] Added support for DateUnit metadata
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.

3 participants