Skip to content

Commit 4912973

Browse files
craig[bot]mw5h
andcommitted
Merge #153821
153821: sql/importer: add hint to vector index IMPORT INTO error r=mw5h a=mw5h Previously, the error message for attempting IMPORT INTO on tables with vector indexes only stated that the operation is not supported. This change adds a helpful hint suggesting users drop the vector index before importing and recreate it afterwards. The hint provides a clear workaround for users encountering this limitation, improving the user experience when working with vector indexes and bulk imports. Release Notes: None Informs: #145227 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Matt White <[email protected]>
2 parents 9c110b4 + d227a39 commit 4912973

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/sql/importer/import_planning.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,9 @@ func importPlanHook(
650650
// Check if the table has any vector indexes
651651
for _, idx := range found.NonDropIndexes() {
652652
if idx.GetType() == idxtype.VECTOR {
653-
return unimplemented.NewWithIssueDetail(145227, "import.vector-index",
654-
"IMPORT INTO is not supported for tables with vector indexes")
653+
return errors.WithHint(unimplemented.NewWithIssueDetail(145227, "import.vector-index",
654+
"IMPORT INTO is not supported for tables with vector indexes"),
655+
"Consider dropping the vector index before importing, then recreating it afterwards.")
655656
}
656657
}
657658

0 commit comments

Comments
 (0)