We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++, Go, and Python all support ListView. The goal of this enhancement is to expand the Arrow Java format input for ListView.
This could be an initial proposal for ListViewVector based on current LisVector implementation:
Using ListViewVector:
... // values = [12, -7, 25, 0, -127, 127, 50] // offsets = [0, 7, 3, 0] // sizes = [3, 0, 4, 0] // data to get thru listview: [[12,-7,25], null, [0,-127,127,50], []] ... listViewVector.allocateNew(); inVector.allocateNew(); inVector.setSafe(0, 12); inVector.setSafe(1, -7); inVector.setSafe(2, 25); inVector.setSafe(3, 0); inVector.setSafe(4, -127); inVector.setSafe(5, 127); inVector.setSafe(6, 50); listViewVector.startNewValue(0, 0); // (0=index, 0=offset) listViewVector.endValue(0, 3); //(0=index, 3=number of items) listViewVector.setNull(1); listViewVector.startNewValue(2, 3); listViewVector.endValue(2, 4); listViewVector.startNewValue(3, 0); listViewVector.endValue(3, 0); listViewVector.setValueCount(4); ... assertEquals(inVector.toString(), "[12, -7, 25, 0, -127, 127, 50]"); assertEquals(listViewVector.toString(), "[[12,-7,25], null, [0,-127,127,50], []]");
Using Writers:
// values = [12, -7, 25, 0, -127, 127, 50] // offsets = [0, 7, 3, 0] // sizes = [3, 0, 4, 0] // data to get thru listview: [[12,-7,25], null, [0,-127,127,50], []] ... UnionListViewWriter writer = inVector.getWriter(); writer.allocate(); writer.setPosition(0); writer.startList(0); // (0=offset) writer.bigInt().writeBigInt(12); writer.bigInt().writeBigInt(-7); writer.bigInt().writeBigInt(25); writer.endList(3); // (3=number of items) writer.setPosition(2); writer.startList(3); writer.bigInt().writeBigInt(0); writer.bigInt().writeBigInt(-127); writer.bigInt().writeBigInt(127); writer.bigInt().writeBigInt(50); writer.endList(4); writer.setPosition(3); writer.startList(0); writer.endList(0); writer.setValueCount(4); ... assertEquals(inVector.getDataVector().toString(), "[12, -7, 25, 0, -127, 127, 50]"); assertEquals(inVector.toString(), "[[12,-7,25], null, [0,-127,127,50], []]");
Java
The text was updated successfully, but these errors were encountered:
Closing this issue in favor of apache/arrow-java#102
Sorry, something went wrong.
davisusanibar
No branches or pull requests
Describe the enhancement requested
C++, Go, and Python all support ListView. The goal of this enhancement is to expand the Arrow Java format input for ListView.
This could be an initial proposal for ListViewVector based on current LisVector implementation:
Using ListViewVector:
Using Writers:
Component(s)
Java
The text was updated successfully, but these errors were encountered: