Skip to content

Conversation

@BryanCutler
Copy link
Member

Modified JsonFileReader and JsonFileWriter to support Date and Time types. Date is written out as a Java Long and Time is written as a Java Integer.

Added new unit test to verify read/write of JSON for Date, Time and Timestamp with milliseconds types.

@wesm
Copy link
Member

wesm commented Mar 10, 2017

Can you add tests for nanoseconds with integer values exceeding 2^32?

@BryanCutler
Copy link
Member Author

sure

@BryanCutler
Copy link
Member Author

@wesm , do you mean a TIME type exceeding 2^32 nanoseconds or a TIMESTAMPNANO type?

@julienledem
Copy link
Member

@wesm @BryanCutler: I think the current TimeVector in java is milliseconds only

@wesm
Copy link
Member

wesm commented Mar 21, 2017

@BryanCutler @julienledem do you want to coordinate to pick up the JSON support so we can get integration tests going? I will try to complete the C++ side sometime in the next week

@julienledem
Copy link
Member

depends on: #407

@BryanCutler
Copy link
Member Author

It will be great to get this going! I should have some time in the next day or so to finish this up. @julienledem , does this also depend on ARROW-663 for additional vector value accessors? I think it should work now for 32-bit ints so maybe just get it working for TIME in milliseconds?

@wesm
Copy link
Member

wesm commented Mar 29, 2017

I just opened ARROW-729. This is effectively blocked until ARROW-663 and 729 are done

@BryanCutler
Copy link
Member Author

@wesm would you still want the JSON read/write test from here? It doesn't look like the other PR had any

@wesm
Copy link
Member

wesm commented Apr 5, 2017

I think it's in there -- the integration tests pass

@BryanCutler
Copy link
Member Author

BryanCutler commented Apr 5, 2017

Not the integration tests, just on the Java side that test the Java JSON reader/writer are working java/vector/src/test/java/org/apache/arrow/vector/file/json/TestJSONFile.java

https://github.com/apache/arrow/pull/366/files#diff-3166d7551b45955e3608b1a9deb0a13cR123

@wesm
Copy link
Member

wesm commented Apr 5, 2017

Ah sorry, I misread. Can you submit a rebased patch with the unit tests, that would be great. Much obliged

@BryanCutler BryanCutler deleted the java-date_time_support-json-ARROW-582 branch April 5, 2017 23:55
@BryanCutler
Copy link
Member Author

sure, just made #495

pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…and Date types, and integration tests

closes apache#366

Author: Leif Walsh <leif.walsh@gmail.com>
Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#475 from leifwalsh/feature/java-date-time-types and squashes the following commits:

2e2a4cf [Leif Walsh] ARROW-729: [Java] removed Joda DateTime getters from Date* and Time* types
47f83a8 [Wes McKinney] Integration tests for all date and time combinations
6e86422 [Wes McKinney] ARROW-733: [C++/Python] Rename FixedWidthBinary to FixedSizeBinary for consistency with FixedSizeList
2dca474 [Leif Walsh] ARROW-729: [Java] Added units for date/time 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.

3 participants