Skip to content

[#8962] improvement(lance): supports more dataTypes for the Lance rest server#8963

Merged
jerryshao merged 2 commits intoapache:branch-lance-namepspace-devfrom
mchades:lrs-datatype
Oct 31, 2025
Merged

[#8962] improvement(lance): supports more dataTypes for the Lance rest server#8963
jerryshao merged 2 commits intoapache:branch-lance-namepspace-devfrom
mchades:lrs-datatype

Conversation

@mchades
Copy link
Copy Markdown
Contributor

@mchades mchades commented Oct 29, 2025

What changes were proposed in this pull request?

supports more dataTypes for the Lance rest server

Why are the changes needed?

Fix: #8962

Does this PR introduce any user-facing change?

yes, more dataTypes supported

How was this patch tested?

tests added

@mchades
Copy link
Copy Markdown
Contributor Author

mchades commented Oct 29, 2025

This PR depends on #8947

@mchades mchades marked this pull request as ready for review October 29, 2025 15:16
@mchades mchades requested review from jerryshao and yuqi1129 October 29, 2025 15:16
@mchades mchades self-assigned this Oct 29, 2025
@mchades
Copy link
Copy Markdown
Contributor Author

mchades commented Oct 30, 2025

@jerryshao @yuqi1129 could you plz help to review this PR? thx

List<VectorSchemaRoot> batches = new ArrayList<>();

while (reader.loadNextBatch()) {
VectorSchemaRoot root = reader.getVectorSchemaRoot();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we abandon the data part?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen it used elsewhere.

@MethodSource("toGravitinoArguments")
void testToGravitino(String testName, Field arrowField, Type expectedGravitinoType) {
Type convertedType = CONVERTER.toGravitino(arrowField);
assertEquals(expectedGravitinoType, convertedType);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you verify arrowFileld == CONVERTER.fromGravitino(CONVERTER.toGravitino(arrowField))

Copy link
Copy Markdown
Contributor Author

@mchades mchades Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They will not be equal because they have different return types (plz see the method signature). What's more, there are already UTs for these two methods

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they have different return types

What's the meaning of it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONVERTER.fromGravitino(Type type) returns ArrowType, not an Arrow Field, so we cannot do the verify arrowField == CONVERTER.fromGravitino

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

Copy link
Copy Markdown
Contributor

@yuqi1129 yuqi1129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment, other LGTM

@MethodSource("toGravitinoArguments")
void testToGravitino(String testName, Field arrowField, Type expectedGravitinoType) {
Type convertedType = CONVERTER.toGravitino(arrowField);
assertEquals(expectedGravitinoType, convertedType);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they have different return types

What's the meaning of it?

@jerryshao jerryshao merged commit d8a4ded into apache:branch-lance-namepspace-dev Oct 31, 2025
29 of 30 checks passed
@mchades mchades deleted the lrs-datatype branch October 31, 2025 02:18
jerryshao pushed a commit to jerryshao/gravitino that referenced this pull request Nov 11, 2025
…ce rest server (apache#8963)

### What changes were proposed in this pull request?

supports more dataTypes for the Lance rest server

### Why are the changes needed?

Fix: apache#8962 

### Does this PR introduce _any_ user-facing change?

yes, more dataTypes supported

### How was this patch tested?

tests added
youngyjd pushed a commit to youngyjd/gravitino that referenced this pull request Nov 20, 2025
…ce rest server (apache#8963)

supports more dataTypes for the Lance rest server

Fix: apache#8962

yes, more dataTypes supported

tests added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants