Skip to content

Commit

Permalink
feat: initial partial commit v2
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Aug 1, 2024
1 parent 07b9af4 commit 0d01f7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions java/vector/src/main/codegen/templates/UnionListWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ public class Union${listName}Writer extends AbstractFieldWriter {
private static final int OFFSET_WIDTH = 4;
</#if>

<#if listName == "ListView" || listName == "LargeListView">
private static final long SIZE_WIDTH = listName == "LargeListView" ? 8 : 4;
<#if listName == "ListView">
private static final long SIZE_WIDTH = 4;
</#if>
<#if listName == "LargeListView">
private static final long SIZE_WIDTH = 8;
</#if>


public Union${listName}Writer(${listName}Vector vector) {
this(vector, NullableStructWriterFactory.getNullableStructWriterFactoryInstance());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
import org.apache.arrow.vector.types.pojo.ArrowType.Int;
import org.apache.arrow.vector.types.pojo.ArrowType.Interval;
import org.apache.arrow.vector.types.pojo.ArrowType.LargeBinary;
import org.apache.arrow.vector.types.pojo.ArrowType.LargeListView;
import org.apache.arrow.vector.types.pojo.ArrowType.LargeUtf8;
import org.apache.arrow.vector.types.pojo.ArrowType.List;
import org.apache.arrow.vector.types.pojo.ArrowType.ListView;
Expand Down Expand Up @@ -1010,6 +1011,11 @@ public MinorType visit(ListView type) {
return MinorType.LISTVIEW;
}

@Override
public MinorType visit(LargeListView type) {
return MinorType.LARGELISTVIEW;
}

@Override
public MinorType visit(ExtensionType type) {
return MinorType.EXTENSIONTYPE;
Expand Down

0 comments on commit 0d01f7d

Please sign in to comment.