[DuckDB] feat: Query index information for DuckDB dynamically#1171
[DuckDB] feat: Query index information for DuckDB dynamically#1171ahmed-kamal2004 wants to merge 4 commits intosqlancer:mainfrom
Conversation
mrigger
left a comment
There was a problem hiding this comment.
Thanks for the PR! I have added some improvement suggestions.
|
|
||
| } | ||
|
|
||
| public static final class DuckDBIndex extends TableIndex { |
There was a problem hiding this comment.
I think we could actually just use the TableIndex class here instead.
|
|
||
| import sqlancer.SQLGlobalState; | ||
|
|
||
| public class DuckGlobalState extends SQLGlobalState<DuckDBOptions, DuckDBSchema> { |
There was a problem hiding this comment.
We already have a global state class for DuckDB.
|
Thanks a lot for the PR! It looks good to me, but it seems the tests are currently failing due to a test oracle report. Could you perhaps try reducing the bug-inducing test cases? It might be a bug in DuckDB. |
|
Based on the current output, it seems that we are repeatedly generating indexes with the same name, so it seems like there might be another issue. |
|
@mrigger actually yes this is another issue, but is it was already here before the change, what I thinking of as a solution for this to get indexes with diff names is to use counter and reset "whenever needed like on schema change". |
|
This functionality is already present in SQLancer and also other DBMSs use it. In the |
Based on PR sqlancer#1171 Addresses sqlancer#1163
This PR resolves issue #1163
Before change
sqlancer/src/sqlancer/duckdb/gen/DuckDBIndexGenerator.java
Line 26 in 7fbfe3d
The indexes names are hard-coded, there is no way AFAIK to store or retrieve them
After change
AbstractSchema::getFreeIndexNameonly.Snippet of the generated creation statements for Indexes


Files Changed
DuckDBTableobject for further usingTesting
command used
java -jar sqlancer-*.jar --num-threads 4 duckdb --oracle NOREC