fix: Add complex types testing for lance#17769
Merged
voonhous merged 2 commits intoapache:masterfrom Jan 8, 2026
Merged
Conversation
49ee9b7 to
27a2ddd
Compare
Collaborator
Author
|
feedback: move tests to data source level, and consolidate tests since we dont one test per type. |
voonhous
reviewed
Jan 6, 2026
| List<InternalRow> expectedRows = new ArrayList<>(); | ||
| expectedRows.add(createRow(1, new Object[]{}, new Object[]{})); // Empty arrays | ||
| expectedRows.add(createRow(2, new Object[]{42}, new Object[]{"Alice"})); // Single element | ||
| expectedRows.add(createRow(3, new Object[]{1, 2, 3, 4, 5}, new Object[]{"Bob", "Charlie", "David"})); // Multi-element |
Member
There was a problem hiding this comment.
Let's add an extra test case to check if we can read null data types correctly as Spark's ArrayData supports null elements. It will be good to verify that Lance preservers them.
expectedRows.add(createRow(4, new Object[]{1, null, 3}, new Object[]{"A", null, "C"}));
Contributor
@rahil-c I tried migrating the code to the datasource tests but that suite is all in scala and it was causing a large amount of changes to get the code compatible with the datasource APIs. We'll just leave the tests where they are. |
the-other-tim-brown
approved these changes
Jan 8, 2026
Collaborator
Member
PavithranRick
pushed a commit
to PavithranRick/hudi
that referenced
this pull request
Jan 8, 2026
* fix: Add complex types testing for lance * add null element test --------- Co-authored-by: Timothy Brown <tim@onehouse.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Describe the issue this Pull Request addresses
Issue: #17665
Add complex type testing for lance file format integration, currently we have only added basic primitive type tests in TestHoodieSparkLanceWriter, but we will need to test types such as (decimal, timestamp, structs, arrays, maps)
Note currently map type in default version of lance file writer is not supported. When trying to run the test
testReadMapTypeencountered the following:For now will keep the map test disabled.
Summary and Changelog
Added complex type testing in
TestHoodieSparkLanceReaderwhich rounds trips using theHoodieSparkLanceWriterImpact
none
Risk Level
low
Documentation Update
Contributor's checklist