Skip to content

Resolves #1163 Add function that supports query index dynamically#1166

Closed
yaojiejia wants to merge 1 commit intosqlancer:mainfrom
yaojiejia:issue
Closed

Resolves #1163 Add function that supports query index dynamically#1166
yaojiejia wants to merge 1 commit intosqlancer:mainfrom
yaojiejia:issue

Conversation

@yaojiejia
Copy link
Copy Markdown
Contributor

@yaojiejia yaojiejia commented Mar 19, 2025

If I understand correctly, I just need to remove hard-coded index and use
globalState.getSchema().getFreeIndexName() instead
Tests ran:

  • mvn package -DskipTests
  • mvn formatter:format
  • mvn verify -DskipTests=true
  • mvn -Dtest=TestDuckDBTLP test
  • mvn -Dtest=TestDuckDBNoREC test

I don't think duckdb supports b-tree and hash index for the index type therefore I didn't include them in here

@yaojiejia
Copy link
Copy Markdown
Contributor Author

yaojiejia commented Mar 19, 2025

Hmm strange! I ran all the tests locally and they seem to be fine, will investigate further
image
image

@mrigger
Copy link
Copy Markdown
Contributor

mrigger commented Mar 20, 2025

It seems like this triggered a bug in DuckDB. You could try to find a reduced version of the bug-inducing test case, see whether it still reproduces on the latest DuckDB version, and then report it to the developers.

@mrigger
Copy link
Copy Markdown
Contributor

mrigger commented Mar 20, 2025

We will also need to add the indexes to the internal schema representation. See

super(tableName, columns, Collections.emptyList(), isView);

@mrigger
Copy link
Copy Markdown
Contributor

mrigger commented Mar 20, 2025

There is another PR that already addresses this: #1171

Did you already continue on this PR? Otherwise, I'd be inclined to focus on reviewing and merging the other PR, as it is more comprehensive despite you being first. What's your thought on this?

@yaojiejia
Copy link
Copy Markdown
Contributor Author

There is another PR that already addresses this: #1171

Did you already continue on this PR? Otherwise, I'd be inclined to focus on reviewing and merging the other PR, as it is more comprehensive despite you being first. What's your thought on this?

Yeah I was trying to find out the root cause and trying to add the indexes to internal schema, but in the mean time I think you should look at the other PR and I will try to figure out what's going on in my end. Thanks!!

@yaojiejia yaojiejia closed this Jul 12, 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.

2 participants