Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

feat: Add table name to default index name#171

Merged
duwenxin99 merged 1 commit intomainfrom
table
Jul 25, 2024
Merged

feat: Add table name to default index name#171
duwenxin99 merged 1 commit intomainfrom
table

Conversation

@duwenxin99
Copy link
Contributor

@duwenxin99 duwenxin99 commented Jul 24, 2024

Add table name as prefix to default index name upon index creation to avoid conflicting default index names for different tables.

  1. Change DEFAULT_INDEX_NAME to DEFAULT_INDEX_NAME_SUFFIX.
  2. Change index_name default in the BaseIndex class to None.
  3. In aapply_vector_index(), check if the index_name field is None and if so, give it a default index name (table_name + DEFAULT_INDEX_NAME_SUFFIX).

@duwenxin99 duwenxin99 requested review from a team July 24, 2024 20:03
@product-auto-label product-auto-label bot added the api: cloudsql-postgres Issues related to the googleapis/langchain-google-cloud-sql-pg-python API. label Jul 24, 2024
Copy link
Contributor

@vishwarajanand vishwarajanand left a comment

Choose a reason for hiding this comment

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

Lgtm

@duwenxin99 duwenxin99 merged commit 8e61bc7 into main Jul 25, 2024
@duwenxin99 duwenxin99 deleted the table branch July 25, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: cloudsql-postgres Issues related to the googleapis/langchain-google-cloud-sql-pg-python API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants