Skip to content

[WIP] Add arrow from javacpp (also upgrades javacpp version)#154

Open
agibsonccc wants to merge 35 commits intomasterfrom
ag_javacpparrow
Open

[WIP] Add arrow from javacpp (also upgrades javacpp version)#154
agibsonccc wants to merge 35 commits intomasterfrom
ag_javacpparrow

Conversation

@agibsonccc
Copy link
Copy Markdown

What changes were proposed in this pull request?

Upgraded java cpp version (snapshots) for the arrow javacpp presets: https://github.com/bytedeco/javacpp-presets/tree/master/arrow
(Please fill in changes proposed in this fix)

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

Quick checklist

The following checklist helps ensure your PR is complete:

  • Eclipse Contributor Agreement signed, and signed commits - see IP Requirements page for details
  • Reviewed the Contributing Guidelines and followed the steps within.
  • Created tests for any significant new code additions.
  • Relevant tests for your changes are passing.

@agibsonccc agibsonccc self-assigned this Dec 29, 2019
@agibsonccc agibsonccc added the enhancement New feature or request label Dec 29, 2019
raver119
raver119 previously approved these changes Dec 29, 2019
Copy link
Copy Markdown

@raver119 raver119 left a comment

Choose a reason for hiding this comment

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

Generally LGTM, not sure about the need for additional datatypes in 1 method though.

case DOUBLE:
Tensor.addTypeType(bufferBuilder,Type.Decimal);
break;
case HALF:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We probably want to add other types here as well: bfloat16, LONG and unsigned types?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think Arrow supports bfloat16. What do we do in those cases @AlexDBlack?

Copy link
Copy Markdown

@AlexDBlack AlexDBlack Dec 30, 2019

Choose a reason for hiding this comment

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

Yeah, it only has float16/32/64, no bfloat16
https://arrow.apache.org/docs/metadata.html
In those cases we'll need to convert, probably to float32 in the case of BFloat16

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ye, bfloat16 range is the same as float32. float16 range is way smaller.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@raver119 what do you think here? This was the official arrow bindings. I can migrate this over to the new one. See ByteDecoArrowSerde now.

Comment thread nd4j/nd4j-serde/nd4j-arrow/src/main/java/org/nd4j/arrow/ByteDecoArrowSerde.java Outdated
Comment thread nd4j/nd4j-serde/nd4j-arrow/src/main/java/org/nd4j/arrow/ByteDecoArrowSerde.java Outdated
@saudet
Copy link
Copy Markdown

saudet commented Jan 21, 2020

FYI, I've finally got the builds working for Arrow with Flight, Gandiva, ORC, Parquet, and Plasma enabled on Linux, Mac, and Windows, so it's now all part of the presets: bytedeco/javacpp-presets@3cf0ef7

@agibsonccc
Copy link
Copy Markdown
Author

@raver119 @saudet I updated this and made it run with the latest master. Besides CI, was else do we need to do here?

saudet
saudet previously approved these changes Feb 3, 2020
@saudet
Copy link
Copy Markdown

saudet commented Feb 3, 2020

It looks alright now. Although the methods to convert arrays could probably be made faster with calls to GetValuesDouble(), etc as shown in this sample code: https://github.com/bytedeco/javacpp-presets/blob/master/arrow/samples/RowWiseConversionExample.java

@saudet saudet requested a review from raver119 April 6, 2020 03:41
@raver119 raver119 assigned raver119 and unassigned agibsonccc Apr 6, 2020
@raver119 raver119 changed the title Add arrow from javacpp (also upgrades javacpp version) [WIP] Add arrow from javacpp (also upgrades javacpp version) Apr 7, 2020
raver119 added 5 commits April 7, 2020 08:32
- couple of stubs for CudaDataBuffer methods

Signed-off-by: raver119 <raver119@gmail.com>
Signed-off-by: raver119 <raver119@gmail.com>
Signed-off-by: raver119 <raver119@gmail.com>
Signed-off-by: raver119 <raver119@gmail.com>
Signed-off-by: raver119 <raver119@gmail.com>
@raver119 raver119 assigned agibsonccc and unassigned raver119 Apr 7, 2020
@raver119
Copy link
Copy Markdown

raver119 commented Apr 7, 2020

I've fixed all ND4J tests for CPU and CUDA. DataVec side of things still looks incomplete. Tests should be testing something actually.

Copy link
Copy Markdown

@raver119 raver119 left a comment

Choose a reason for hiding this comment

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

DataVec side of things looks incomplete. Tests do not actually test anything, besides of the execution fact etc

@raver119
Copy link
Copy Markdown

raver119 commented Apr 7, 2020

Another thing to mention: datavec-arrow goes mad on JVM11 due to netty relying on Unsafe methods.

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.

5 participants