-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add create statement support to fuzzer #9011
Add create statement support to fuzzer #9011
Conversation
…g methods for a lot of the create statements first
…cause of bad random string creation
One thing that could be worth testing for with the random names is names that contain spaces, |
There was a problem hiding this 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! Looks good - some comments:
string ret = ""; | ||
|
||
ret += "CREATE TABLE " + table; | ||
if (query != nullptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already code for converting a TableCatalogEntry
to SQL - see TableCatalogEntry::ToSQL
. Could we unify this with that?
@@ -22,4 +22,15 @@ unique_ptr<CreateInfo> CreateTypeInfo::Copy() const { | |||
return std::move(result); | |||
} | |||
|
|||
string CreateTypeInfo::ToString() const { | |||
string ret = "CREATE TYPE "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here this exists in TypeCatalogEntry::ToSQL
|
||
string ToString() const override { | ||
string ret = ""; | ||
switch (on_conflict) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also exists in SchemaCatalogEntry::ToSQL
but doesn't support the different on conflict clauses - could they be merged as well?
Thanks! |
Merge pull request duckdb/duckdb#9164 from Mause/feature/jdbc-uuid-param Merge pull request duckdb/duckdb#9185 from pdet/adbc_07 Merge pull request duckdb/duckdb#9126 from Maxxen/parquet-kv-metadata Merge pull request duckdb/duckdb#9123 from lnkuiper/parquet_schema Merge pull request duckdb/duckdb#9086 from lnkuiper/json_inconsistent_structure Merge pull request duckdb/duckdb#8977 from Tishj/python_readcsv_multi_v2 Merge pull request duckdb/duckdb#9279 from hawkfish/nsdate-cast Merge pull request duckdb/duckdb#8851 from taniabogatsch/binary_lambdas Merge pull request duckdb/duckdb#8983 from Maxxen/types/fixedsizelist Merge pull request duckdb/duckdb#9318 from Maxxen/fix-unused Merge pull request duckdb/duckdb#9220 from hawkfish/exclude Merge pull request duckdb/duckdb#9230 from Maxxen/json-plan-serialization Merge pull request duckdb/duckdb#9011 from Tmonster/add_create_statement_support_to_fuzzer Merge pull request duckdb/duckdb#9400 from Maxxen/array-fixes Merge pull request duckdb/duckdb#8741 from Tishj/python_import_cache_upgrade Merge fixes Merge pull request duckdb/duckdb#9395 from taniabogatsch/lambda-performance Merge pull request duckdb/duckdb#9427 from Tishj/python_table_support_replacement_scan Merge pull request duckdb/duckdb#9516 from carlopi/fixformat Merge pull request duckdb/duckdb#9485 from Maxxen/fix-parquet-serialization Merge pull request duckdb/duckdb#9388 from chrisiou/issue217 Merge pull request duckdb/duckdb#9565 from Maxxen/fix-array-vector-sizes Merge pull request duckdb/duckdb#9583 from carlopi/feature Merge pull request duckdb/duckdb#8907 from cryoEncryp/new-list-functions Merge pull request duckdb/duckdb#8642 from Virgiel/capi-streaming-arrow Merge pull request duckdb/duckdb#8658 from Tishj/pytype_optional Merge pull request duckdb/duckdb#9040 from Light-City/feature/set_mg
Adding support for some create statements to the fuzzer.
You can create a table (although there is a high chance this query fails since it involves creating another select statement, which might have it's own errors.)
You can create a view
You can create an enum of strings. TODO: to fuzz more enum types.
You can create a schema. (I don't think
GetDatabaseState(ClientContext &context)
gathers information about schemas though, so I don't think these schemas will be tested against.)This also adds a Random String function for the Enum type. Open to adding a list dictionary of names we want to use (like adjective + duck breed)