Skip to content

Conversation

EricZequan
Copy link
Contributor

@EricZequan EricZequan commented Jan 15, 2025

What problem does this PR solve?

Issue Number: ref pingcap/tidb#54245

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

@CLAassistant
Copy link

CLAassistant commented Jan 15, 2025

CLA assistant check
All committers have signed the CLA.

@EricZequan
Copy link
Contributor Author

/retest

…ctor index is not built

Signed-off-by: “EricZequan” <[email protected]>
Signed-off-by: “EricZequan” <[email protected]>
Signed-off-by: “EricZequan” <[email protected]>
Signed-off-by: “EricZequan” <[email protected]>
Signed-off-by: “EricZequan” <[email protected]>
Signed-off-by: “EricZequan” <[email protected]>
@breezewish breezewish requested a review from Copilot March 22, 2025 03:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new boolean field (enable_distance_proj) to the ANNQueryInfo message to indicate whether to read a distance column from the vector index and adjusts associated field numbering and deprecation.

  • Introduces enable_distance_proj to control distance projection behavior.
  • Deprecates the original column_id field and adds a new ColumnInfo column field for schema metadata persistence.
  • Renumbers ref_vec_f32 and index_id fields to accommodate the new fields while reserving space for future changes.

optional uint32 hnsw_ef_search = 20 [(gogoproto.nullable) = false]; // Only for HNSW indexes

// If enabled, the content of TableScan's vector output column (whose ID is column.id) will be removed and
// TableScan will read an distance column (whose id must be -2000) as replacement, tiflash persistent layer
Copy link

Copilot AI Mar 22, 2025

Choose a reason for hiding this comment

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

Typographical error: 'an distance column' should be 'a distance column'.

Suggested change
// TableScan will read an distance column (whose id must be -2000) as replacement, tiflash persistent layer
// TableScan will read a distance column (whose id must be -2000) as replacement, tiflash persistent layer

Copilot uses AI. Check for mistakes.

optional uint32 hnsw_ef_search = 20 [(gogoproto.nullable) = false]; // Only for HNSW indexes

// If enabled, the content of TableScan's vector output column (whose ID is column.id) will be removed and
// TableScan will read an distance column (whose id must be -2000) as replacement, tiflash persistent layer
Copy link

Copilot AI Mar 22, 2025

Choose a reason for hiding this comment

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

[nitpick] Typographical error: 'tiflash' should likely be 'TiFlash' to match standard capitalization.

Suggested change
// TableScan will read an distance column (whose id must be -2000) as replacement, tiflash persistent layer
// TableScan will read an distance column (whose id must be -2000) as replacement, TiFlash persistent layer

Copilot uses AI. Check for mistakes.

optional string column_name = 4 [(gogoproto.nullable) = false]; // For debug purpose only. Currently only used in explain.
optional int64 column_id = 5 [(gogoproto.nullable) = false];
// deprecated field, we use column to get the id first, and this field will not be set again.
// Retain this field to be compatible with older versions of tidb
Copy link

Copilot AI Mar 22, 2025

Choose a reason for hiding this comment

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

[nitpick] Typographical error: 'tidb' should be capitalized as 'TiDB'.

Suggested change
// Retain this field to be compatible with older versions of tidb
// Retain this field to be compatible with older versions of TiDB

Copilot uses AI. Check for mistakes.

@EricZequan
Copy link
Contributor Author

This PR is used for large model review and testing. New PR are moved to: #358

@EricZequan EricZequan changed the title *: Add enable_distance_proj to ANNQueryInfo to indicate if reading distance column from vector index [Test for AI review]*: Add enable_distance_proj to ANNQueryInfo to indicate if reading distance column from vector index Mar 26, 2025
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