Skip to content

Commit d227a39

Browse files
mw5hclaude
andcommitted
sql/importer: add hint to vector index IMPORT INTO error
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 note: none Informs: #145227 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3389d85 commit d227a39

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)