danepitkin commented on code in PR #43516:
URL: https://github.com/apache/arrow/pull/43516#discussion_r1710005947
##########
java/vector/src/main/codegen/templates/ComplexCopier.java:
##########
@@ -53,6 +53,7 @@ private static void writeValue(FieldReader reader,
FieldWriter writer) {
case LIST:
case LISTVIEW:
case LARGELIST:
+ case LARGELISTVIEW:
Review Comment:
ListView is also referenced on lines 163, 187, 210. Do we need to add
LargeListView there, too?
##########
java/vector/src/main/codegen/templates/UnionListWriter.java:
##########
@@ -231,12 +234,31 @@ public void endList() {
listStarted = false;
}
+ @Override
public void startListView() {
vector.startNewValue(idx());
writer.setPosition(vector.getOffsetBuffer().getInt((idx()) *
OFFSET_WIDTH));
listStarted = true;
}
+ @Override
+ public void endListView() {
+ int sizeUptoIdx = 0;
+ for (int i = 0; i < idx(); i++) {
+ sizeUptoIdx += vector.getSizeBuffer().getInt(i * SIZE_WIDTH);
+ }
+ vector.getSizeBuffer().setInt(idx() * SIZE_WIDTH, writer.idx() -
sizeUptoIdx);
+ setPosition(idx() + 1);
+ listStarted = false;
+ }
+ <#elseif listName == "LargeListView">
+ @Override
+ public void startListView() {
+ vector.startNewValue(idx());
+
writer.setPosition(checkedCastToInt(vector.getOffsetBuffer().getInt((idx()) *
OFFSET_WIDTH)));
+ listStarted = true;
+ }
+
Review Comment:
ListView includes `startList()` and `endList()` apis. Should LargeListView
have them, too?
##########
java/vector/src/main/codegen/templates/PromotableWriter.java:
##########
@@ -194,6 +219,28 @@ public PromotableWriter(
this.parentContainer = null;
this.listVector = null;
this.listViewVector = null;
+ this.largeListViewVector = null;
+ this.nullableStructWriterFactory = nullableStructWriterFactory;
+ init(v);
+ }
+
+ /**
+ * Constructs a new instance.
+ *
+ * @param v The vector to initialize the writer with.
+ * @param largeListViewVector The vector that serves as a parent of v.
+ * @param nullableStructWriterFactory The factory to create the delegate
writer.
+ */
+ public PromotableWriter(
+ ValueVector v,
+ LargeListViewVector largeListViewVector,
+ NullableStructWriterFactory nullableStructWriterFactory) {
+ this.largeListViewVector = largeListViewVector;
+ this.fixedListVector = null;
+ this.parentContainer = null;
+ this.listVector = null;
+ this.listViewVector = null;
+ this.largeListVector = null;
Review Comment:
ListView is also referenced on lines 279, 344, 389, 575. Do we need to add
LargeListView, too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]