Skip to content

Conversation

taniabogatsch
Copy link
Contributor

VerifyIndexDoesNotExist throws catalog exceptions early, preventing building an entire index only to throw later.
For CREATE INDEX IF NOT EXISTS, we initialize a finished flag to skip over any index creation.

Fix https://github.com/duckdblabs/duckdb-internal/issues/4163.

@taniabogatsch taniabogatsch changed the base branch from main to v1.2-histrionicus February 6, 2025 14:07
Copy link
Collaborator

@Mytherin Mytherin left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! LGTM - one comment:

@Mytherin
Copy link
Collaborator

Mytherin commented Feb 6, 2025

Actually thinking about this some more - it would probably be better to detect this earlier (e.g. in the plan_create_index). We are still doing a bunch of unnecessary work here currently.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft February 17, 2025 12:49
@taniabogatsch taniabogatsch marked this pull request as ready for review February 17, 2025 13:50
@duckdb-draftbot duckdb-draftbot marked this pull request as draft February 18, 2025 13:20
@Mytherin Mytherin marked this pull request as ready for review February 18, 2025 13:28
@Mytherin Mytherin merged commit 5509eb4 into duckdb:v1.2-histrionicus Feb 18, 2025
50 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

@taniabogatsch taniabogatsch deleted the early-create-idx-check branch February 18, 2025 20:47
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Mar 7, 2025
[Fix] Early-out on CREATE INDEX (IF NOT EXISTS) (duckdb/duckdb#16093)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants