Skip to content

GH-301: [Vector] Allow adding a vector at the end of VectorSchemaRoot - #1013

Merged
jbonofre merged 1 commit into
apache:mainfrom
axreldable:add-vector-to-end
Mar 11, 2026
Merged

jbonofre merged 1 commit into
apache:mainfrom
axreldable:add-vector-to-end

Conversation

@axreldable

@axreldable axreldable commented Feb 8, 2026 •

Copy link
Copy Markdown
Contributor

What's Changed

Allow adding a vector at the end of VectorSchemaRoot in the VectorSchemaRoot#addVector() method.

Previously, the precondition index < fieldVectors.size() rejected index == fieldVectors.size(), so appending was impossible. The precondition is now index <= fieldVectors.size(), and when index == fieldVectors.size() the new vector is appended after all existing vectors.

The implementation of VectorSchemaRoot#addVector() is now aligned with BaseTable#insertVector()

The change is backward compatible, as it extends the functionality of the VectorSchemaRoot#addVector() method.

Closes #301.

@github-actions

This comment has been minimized.

@axreldable

Copy link
Copy Markdown
Contributor Author

I'd say it's an enhancement rather than a bug fix (#301 is labeled as a bug).

@lidavidm lidavidm added enhancement PRs that add or improve features. and removed breaking-change labels Feb 8, 2026
@github-actions github-actions Bot added this to the 19.0.0 milestone Feb 8, 2026
@axreldable

Copy link
Copy Markdown
Contributor Author

Hi @lidavidm and probably @kou ! Could you please help kicking off the build?

@jbonofre

Copy link
Copy Markdown
Member

@axreldable can you please rebase this PR ? The CI should be triggered and clean.

@axreldable

Copy link
Copy Markdown
Contributor Author

@axreldable can you please rebase this PR ? The CI should be triggered and clean.

@jbonofre , rebased, but looks like it needs to be kicked off. It's not triggered automatically. Could you help with it?

@axreldable

Copy link
Copy Markdown
Contributor Author

@axreldable can you please rebase this PR ? The CI should be triggered and clean.

@jbonofre , rebased, but looks like it needs to be kicked off. It's not triggered automatically. Could you help with it?

Hi @jbonofre ! The build was successful. Should I rebase again after the latest changes?

@ennuite ennuite left a comment

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.

lgtm, it's the same code as the issue report

@axreldable

Copy link
Copy Markdown
Contributor Author

@jbonofre , what do you think about this change?

@axreldable axreldable changed the title GH-301: Allow adding a vector at the end of VectorSchemaRoot Mar 9, 2026

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks.

It basically mirrors BaseTable#insertVector() so it makes perfect sense.

@jbonofre
jbonofre merged commit 6ffb2d0 into apache:main Mar 11, 2026
49 of 51 checks passed
@axreldable
axreldable deleted the add-vector-to-end branch March 11, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that add or improve features.

4 participants