Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public Void visit(BlobType blobType) {

@Override
public Void visit(ArrayType arrayType) {
return null;
return arrayType.getElementType().accept(this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ public void testValidateDataFields_UnsupportedMultisetType() {
assertThrows(UnsupportedOperationException.class, () -> format.validateDataFields(rowType));
}

@Test
public void testValidateDataFields_UnsupportedTypeNestedInArray() {
LanceFileFormat format =
new LanceFileFormat(new FileFormatFactory.FormatContext(new Options(), 1024, 1024));
RowType rowType = RowType.of(DataTypes.ARRAY(DataTypes.MULTISET(DataTypes.STRING())));
assertThrows(UnsupportedOperationException.class, () -> format.validateDataFields(rowType));
}

@Test
public void testValidateDataFields_SupportedTypeNestedInArray() {
LanceFileFormat format =
new LanceFileFormat(new FileFormatFactory.FormatContext(new Options(), 1024, 1024));
RowType rowType = RowType.of(DataTypes.ARRAY(DataTypes.ARRAY(DataTypes.INT())));
assertDoesNotThrow(() -> format.validateDataFields(rowType));
}

@Test
public void testValidateDataFields_SupportedTypes() {
LanceFileFormat format =
Expand Down
Loading