Skip to content

refactor(PGVector): wrap gin index creation into a separate function#4980

Open
r3v5 wants to merge 1 commit intollamastack:mainfrom
r3v5:wrap-gin-index-creation-into-separate-function
Open

refactor(PGVector): wrap gin index creation into a separate function#4980
r3v5 wants to merge 1 commit intollamastack:mainfrom
r3v5:wrap-gin-index-creation-into-separate-function

Conversation

@r3v5
Copy link
Contributor

@r3v5 r3v5 commented Feb 23, 2026

What does this PR do?

This PR is responsible for refactoring GIN index creation in pgvector wrapping creation logic into a separate function that is being called within initialize(self) in PGVectorIndex

Impact: makes code more modular, extendable and simplifies testing.

Test Plan

Added unit tests and existing CI

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 23, 2026
@r3v5 r3v5 force-pushed the wrap-gin-index-creation-into-separate-function branch 2 times, most recently from 495cf0d to 16538bd Compare February 23, 2026 15:47
@r3v5 r3v5 changed the title refactor(PGVector): wrap gin index creation into separate function refactor(PGVector): wrap gin index creation into a separate function Feb 23, 2026
@r3v5 r3v5 force-pushed the wrap-gin-index-creation-into-separate-function branch 7 times, most recently from 9fc6fdc to f2f2508 Compare February 25, 2026 12:57
Copy link
Contributor

@ChristianZaccaria ChristianZaccaria left a comment

Choose a reason for hiding this comment

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

Looks good! I just left a couple of comments.

@r3v5 r3v5 force-pushed the wrap-gin-index-creation-into-separate-function branch 4 times, most recently from b37b655 to 17b53f6 Compare February 25, 2026 15:54
@r3v5 r3v5 force-pushed the wrap-gin-index-creation-into-separate-function branch from 17b53f6 to 30fc65c Compare February 26, 2026 14:15
Copy link
Contributor

@derekhiggins derekhiggins left a comment

Choose a reason for hiding this comment

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

lgtm, not sure we need both test_create_gin_index_executes_correct_sql and test_gin_index_creation_in_initialize_call but thats just me :-)

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants