Skip to content
Merged
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 @@ -180,12 +180,13 @@ public Void visit(LocalZonedTimestampType localZonedTimestampType) {

@Override
public Void visit(VariantType variantType) {
return null;
throw new UnsupportedOperationException(
"Lance file format does not support type VARIANT");
}

@Override
public Void visit(BlobType blobType) {
return null;
throw new UnsupportedOperationException("Lance file format does not support type BLOB");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,20 @@ public void testValidateDataFields_SupportedTypes() {
// Validate that no exception is thrown for supported types
assertDoesNotThrow(() -> format.validateDataFields(rowType));
}

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

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