Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion format/Schema.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ table Struct_ {
table List {
}

table FixedSizeList {
/// Number of list items per value
listSize: int;
}

enum UnionMode:short { Sparse, Dense }

/// A union is a complex type with children in Field
Expand Down Expand Up @@ -159,7 +164,8 @@ union Type {
List,
Struct_,
Union,
FixedSizeBinary
FixedSizeBinary,
FixedSizeList
}

/// ----------------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions java/vector/src/main/codegen/data/ArrowTypes.tdd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
fields: [],
complex: true
},
{
name: "FixedSizeList",
fields: [{name: "listSize", type: int}],
complex: true
},
{
name: "Union",
fields: [{name: "mode", type: short, valueType: UnionMode}, {name: "typeIds", type: "int[]"}],
Expand Down
2 changes: 2 additions & 0 deletions java/vector/src/main/codegen/templates/ComplexCopier.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ private static void writeValue(FieldReader reader, FieldWriter writer) {
writer.endList();
}
break;
case FIXED_SIZE_LIST:
throw new UnsupportedOperationException("Copy fixed size list");
case MAP:
if (reader.isSet()) {
writer.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ public boolean isEmpty(int index) {
public abstract class BaseRepeatedMutator extends BaseValueVector.BaseMutator implements RepeatedMutator {

@Override
public void startNewValue(int index) {
public int startNewValue(int index) {
while (offsets.getValueCapacity() <= index) {
offsets.reAlloc();
}
offsets.getMutator().setSafe(index+1, offsets.getAccessor().get(index));
int offset = offsets.getAccessor().get(index);
offsets.getMutator().setSafe(index+1, offset);
setValueCount(index+1);
return offset;
}

@Override
Expand Down
Loading