From 3cf5f78d05256333e24386e9cb258e4d66cba89e Mon Sep 17 00:00:00 2001 From: Will Baker Date: Thu, 24 Oct 2024 10:09:48 -0400 Subject: [PATCH] materialize-motherduck: use the reserved words list from `duckdb_keywords()` This seems to be a more complete list of words that need quoted, since we have found that column names like `end` don't work without quotes, and that is on the list output from `duckdb_keywords()`. --- .../.snapshots/TestSQLGeneration | 12 +- materialize-motherduck/reserved_words.go | 538 +++++++++--------- .../materialize-motherduck/snapshot.json | 2 +- 3 files changed, 262 insertions(+), 290 deletions(-) diff --git a/materialize-motherduck/.snapshots/TestSQLGeneration b/materialize-motherduck/.snapshots/TestSQLGeneration index e10e5e0e5..4e313e9ff 100644 --- a/materialize-motherduck/.snapshots/TestSQLGeneration +++ b/materialize-motherduck/.snapshots/TestSQLGeneration @@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS ""."a-schema".key_value ( "key!binary" VARCHAR NOT NULL, "array" JSON, "binary" VARCHAR, - boolean BOOLEAN, + "boolean" BOOLEAN, flow_published_at TIMESTAMP WITH TIME ZONE NOT NULL, "integer" BIGINT, "integerGt64Bit" HUGEINT, @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS ""."a-schema".key_value ( multiple JSON, number DOUBLE, "numberCastToString" VARCHAR, - object JSON, + "object" JSON, string VARCHAR, "stringInteger" HUGEINT, "stringInteger39Chars" VARCHAR, @@ -72,7 +72,7 @@ USING read_json( "key!binary": 'VARCHAR NOT NULL', "array": 'JSON', "binary": 'VARCHAR', - boolean: 'BOOLEAN', + "boolean": 'BOOLEAN', flow_published_at: 'TIMESTAMP WITH TIME ZONE NOT NULL', "integer": 'BIGINT', "integerGt64Bit": 'HUGEINT', @@ -80,7 +80,7 @@ USING read_json( multiple: 'JSON', number: 'DOUBLE', "numberCastToString": 'VARCHAR', - object: 'JSON', + "object": 'JSON', string: 'VARCHAR', "stringInteger": 'HUGEINT', "stringInteger39Chars": 'VARCHAR', @@ -106,7 +106,7 @@ SELECT * FROM read_json( "key!binary": 'VARCHAR NOT NULL', "array": 'JSON', "binary": 'VARCHAR', - boolean: 'BOOLEAN', + "boolean": 'BOOLEAN', flow_published_at: 'TIMESTAMP WITH TIME ZONE NOT NULL', "integer": 'BIGINT', "integerGt64Bit": 'HUGEINT', @@ -114,7 +114,7 @@ SELECT * FROM read_json( multiple: 'JSON', number: 'DOUBLE', "numberCastToString": 'VARCHAR', - object: 'JSON', + "object": 'JSON', string: 'VARCHAR', "stringInteger": 'HUGEINT', "stringInteger39Chars": 'VARCHAR', diff --git a/materialize-motherduck/reserved_words.go b/materialize-motherduck/reserved_words.go index ec588c1f7..2a8661aef 100644 --- a/materialize-motherduck/reserved_words.go +++ b/materialize-motherduck/reserved_words.go @@ -1,396 +1,296 @@ package main -import "slices" - -// Ref: https://github.com/duckdb/duckdb/blob/ff7f24fd8e3128d94371827523dae85ebaf58713/third_party/libpg_query/grammar/keywords/ +// This list is generated by running the following query on MotherDuck on +// 24-Oct-2024, with MotherDuck running on v1.1.2. // -// There are several sets of "reserved" words, and they are joined together in -// the DUCKDB_RESERVED_WORDS constant. - -var DUCKDB_RESERVED_WORDS = func() []string { - var out []string - - for _, words := range [][]string{ - column_name_keywords, - func_name_keywords, - reserved_keywords, - type_name_keywords, - unreserved_keywords, - } { - out = append(out, words...) - } - - // There are some repeats amongst the separate lists which are removed - // before returning the final list. - slices.Sort(out) - return slices.Compact(out) -}() - -var column_name_keywords = []string{ - "BETWEEN", - "BIGINT", - "BIT", - "BOOLEAN_P", - "CHAR_P", - "CHARACTER", - "COALESCE", - "DEC", - "DECIMAL_P", - "EXISTS", - "EXTRACT", - "FLOAT_P", - "GROUPING", - "INOUT", - "INT_P", - "INTEGER", - "INTERVAL", - "MAP", - "NATIONAL", - "NCHAR", - "NONE", - "NULLIF", - "NUMERIC", - "OUT_P", - "OVERLAY", - "POSITION", - "PRECISION", - "REAL", - "ROW", - "SETOF", - "SMALLINT", - "SUBSTRING", - "STRUCT", - "TIME", - "TIMESTAMP", - "TREAT", - "TRIM", - "TRY_CAST", - "VALUES", - "VARCHAR", - "XMLATTRIBUTES", - "XMLCONCAT", - "XMLELEMENT", - "XMLEXISTS", - "XMLFOREST", - "XMLNAMESPACES", - "XMLPARSE", - "XMLPI", - "XMLROOT", - "XMLSERIALIZE", - "XMLTABLE", -} - -var func_name_keywords = []string{ - "AUTHORIZATION", - "BINARY", - "COLLATION", - "CONCURRENTLY", - "CROSS", - "CURRENT_SCHEMA", - "FREEZE", - "FULL", - "GLOB", - "ILIKE", - "INNER_P", - "IS", - "ISNULL", - "JOIN", - "LEFT", - "LIKE", - "MAP", - "NATURAL", - "NOTNULL", - "OUTER_P", - "OVERLAPS", - "RIGHT", - "SIMILAR", - "STRUCT", - "TABLESAMPLE", - "VERBOSE", -} - -var reserved_keywords = []string{ - "ALL", - "ANALYSE", - "ANALYZE", - "AND", - "ANY", - "ARRAY", - "AS", - "ASC_P", - "ASYMMETRIC", - "BOTH", - "CASE", - "CAST", - "CHECK_P", - "COLLATE", - "COLUMN", - "CONSTRAINT", - "CREATE_P", - "CURRENT_CATALOG", - "CURRENT_DATE", - "CURRENT_ROLE", - "CURRENT_TIME", - "CURRENT_TIMESTAMP", - "CURRENT_USER", - "DEFAULT", - "DEFERRABLE", - "DESC_P", - "DISTINCT", - "DO", - "ELSE", - "END_P", - "EXCEPT", - "FALSE_P", - "FETCH", - "FOR", - "FOREIGN", - "FROM", - "GRANT", - "GROUP_P", - "HAVING", - "IN_P", - "INITIALLY", - "INTERSECT", - "INTO", - "LATERAL_P", - "LEADING", - "LIMIT", - "LOCALTIME", - "LOCALTIMESTAMP", - "NOT", - "NULL_P", - "OFFSET", - "ON", - "ONLY", - "OR", - "ORDER", - "PLACING", - "PRIMARY", - "REFERENCES", - "RETURNING", - "SELECT", - "SESSION_USER", - "SOME", - "SYMMETRIC", - "TABLE", - "THEN", - "TO", - "TRAILING", - "TRUE_P", - "UNION", - "UNIQUE", - "USER", - "USING", - "VARIADIC", - "WHEN", - "WHERE", - "WINDOW", - "WITH", -} - -var type_name_keywords = []string{ - "AUTHORIZATION", - "BINARY", - "COLLATION", - "CONCURRENTLY", - "CROSS", - "CURRENT_SCHEMA", - "FREEZE", - "FULL", - "GLOB", - "ILIKE", - "INNER_P", - "IS", - "ISNULL", - "JOIN", - "LEFT", - "LIKE", - "NATURAL", - "NOTNULL", - "OUTER_P", - "OVERLAPS", - "RIGHT", - "SIMILAR", - "TABLESAMPLE", - "TRY_CAST", - "VERBOSE", -} +// Note that CHECKPOINT is not included as a reserved word since it messes up +// the standard fence test snapshots, and also it does not seem to need to be +// quoted for a table or column name. +// +// select upper(keyword_name) from duckdb_keywords() where keyword_name != 'checkpoint' order by keyword_name asc; -var unreserved_keywords = []string{ - "ABORT_P", - "ABSOLUTE_P", +var DUCKDB_RESERVED_WORDS = []string{ + "ABORT", + "ABSOLUTE", "ACCESS", "ACTION", - "ADD_P", + "ADD", "ADMIN", "AFTER", "AGGREGATE", + "ALL", "ALSO", "ALTER", "ALWAYS", + "ANALYSE", + "ANALYZE", + "AND", + "ANTI", + "ANY", + "ARRAY", + "AS", + "ASC", + "ASOF", "ASSERTION", "ASSIGNMENT", + "ASYMMETRIC", "AT", "ATTACH", "ATTRIBUTE", + "AUTHORIZATION", "BACKWARD", "BEFORE", - "BEGIN_P", + "BEGIN", + "BETWEEN", + "BIGINT", + "BINARY", + "BIT", + "BOOLEAN", + "BOTH", "BY", "CACHE", - "CALL_P", + "CALL", "CALLED", "CASCADE", "CASCADED", - "CATALOG_P", + "CASE", + "CAST", + "CATALOG", + "CENTURIES", + "CENTURY", "CHAIN", + "CHAR", + "CHARACTER", "CHARACTERISTICS", - // "CHECKPOINT", // Not including this as a reserved word since it messed up the standard fence test snapshots, and also it does not seem to need to be quoted for a table or column name. + "CHECK", "CLASS", "CLOSE", "CLUSTER", + "COALESCE", + "COLLATE", + "COLLATION", + "COLUMN", "COLUMNS", "COMMENT", "COMMENTS", "COMMIT", "COMMITTED", + "COMPRESSION", + "CONCURRENTLY", "CONFIGURATION", "CONFLICT", "CONNECTION", + "CONSTRAINT", "CONSTRAINTS", - "CONTENT_P", - "CONTINUE_P", - "CONVERSION_P", + "CONTENT", + "CONTINUE", + "CONVERSION", "COPY", "COST", + "CREATE", + "CROSS", "CSV", "CUBE", - "CURRENT_P", + "CURRENT", "CURSOR", "CYCLE", - "DATA_P", + "DATA", "DATABASE", - "DAY_P", - "DAYS_P", + "DAY", + "DAYS", "DEALLOCATE", + "DEC", + "DECADE", + "DECADES", + "DECIMAL", "DECLARE", + "DEFAULT", "DEFAULTS", + "DEFERRABLE", "DEFERRED", "DEFINER", - "DELETE_P", + "DELETE", "DELIMITER", "DELIMITERS", "DEPENDS", + "DESC", "DESCRIBE", "DETACH", "DICTIONARY", - "DISABLE_P", + "DISABLE", "DISCARD", - "DOCUMENT_P", - "DOMAIN_P", - "DOUBLE_P", + "DISTINCT", + "DO", + "DOCUMENT", + "DOMAIN", + "DOUBLE", "DROP", "EACH", - "ENABLE_P", + "ELSE", + "ENABLE", "ENCODING", "ENCRYPTED", - "ENUM_P", + "END", + "ENUM", "ESCAPE", "EVENT", + "EXCEPT", "EXCLUDE", "EXCLUDING", "EXCLUSIVE", "EXECUTE", + "EXISTS", "EXPLAIN", - "EXPORT_P", + "EXPORT", + "EXPORT_STATE", "EXTENSION", + "EXTENSIONS", "EXTERNAL", + "EXTRACT", + "FALSE", "FAMILY", + "FETCH", "FILTER", - "FIRST_P", + "FIRST", + "FLOAT", "FOLLOWING", + "FOR", "FORCE", + "FOREIGN", "FORWARD", + "FREEZE", + "FROM", + "FULL", "FUNCTION", "FUNCTIONS", "GENERATED", + "GLOB", "GLOBAL", + "GRANT", "GRANTED", + "GROUP", + "GROUPING", + "GROUPING_ID", + "GROUPS", "HANDLER", - "HEADER_P", + "HAVING", + "HEADER", "HOLD", - "HOUR_P", - "HOURS_P", - "IDENTITY_P", - "IF_P", + "HOUR", + "HOURS", + "IDENTITY", + "IF", + "IGNORE", + "ILIKE", "IMMEDIATE", "IMMUTABLE", - "IMPLICIT_P", - "IMPORT_P", + "IMPLICIT", + "IMPORT", + "IN", + "INCLUDE", "INCLUDING", "INCREMENT", "INDEX", "INDEXES", "INHERIT", "INHERITS", - "INLINE_P", - "INPUT_P", + "INITIALLY", + "INLINE", + "INNER", + "INOUT", + "INPUT", "INSENSITIVE", "INSERT", + "INSTALL", "INSTEAD", + "INT", + "INTEGER", + "INTERSECT", + "INTERVAL", + "INTO", "INVOKER", + "IS", + "ISNULL", "ISOLATION", + "JOIN", + "JSON", "KEY", "LABEL", "LANGUAGE", - "LARGE_P", - "LAST_P", + "LARGE", + "LAST", + "LATERAL", + "LEADING", "LEAKPROOF", + "LEFT", "LEVEL", + "LIKE", + "LIMIT", "LISTEN", "LOAD", "LOCAL", "LOCATION", - "LOCK_P", + "LOCK", "LOCKED", "LOGGED", "MACRO", + "MAP", "MAPPING", "MATCH", "MATERIALIZED", "MAXVALUE", "METHOD", - "MICROSECOND_P", - "MICROSECONDS_P", - "MILLISECOND_P", - "MILLISECONDS_P", - "MINUTE_P", - "MINUTES_P", + "MICROSECOND", + "MICROSECONDS", + "MILLENNIA", + "MILLENNIUM", + "MILLISECOND", + "MILLISECONDS", + "MINUTE", + "MINUTES", "MINVALUE", "MODE", - "MONTH_P", - "MONTHS_P", + "MONTH", + "MONTHS", "MOVE", - "NAME_P", + "NAME", "NAMES", + "NATIONAL", + "NATURAL", + "NCHAR", "NEW", "NEXT", "NO", + "NONE", + "NOT", "NOTHING", "NOTIFY", + "NOTNULL", "NOWAIT", - "NULLS_P", - "OBJECT_P", + "NULL", + "NULLIF", + "NULLS", + "NUMERIC", + "OBJECT", "OF", "OFF", + "OFFSET", "OIDS", "OLD", + "ON", + "ONLY", "OPERATOR", "OPTION", "OPTIONS", + "OR", + "ORDER", "ORDINALITY", + "OTHERS", + "OUT", + "OUTER", "OVER", + "OVERLAPS", + "OVERLAY", "OVERRIDING", "OWNED", "OWNER", @@ -401,120 +301,192 @@ var unreserved_keywords = []string{ "PASSING", "PASSWORD", "PERCENT", + "PERSISTENT", + "PIVOT", + "PIVOT_LONGER", + "PIVOT_WIDER", + "PLACING", "PLANS", "POLICY", - "PRAGMA_P", + "POSITION", + "POSITIONAL", + "PRAGMA", "PRECEDING", + "PRECISION", "PREPARE", "PREPARED", "PRESERVE", + "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURAL", "PROCEDURE", "PROGRAM", "PUBLICATION", + "QUALIFY", + "QUARTER", + "QUARTERS", "QUOTE", "RANGE", - "READ_P", + "READ", + "REAL", "REASSIGN", "RECHECK", "RECURSIVE", "REF", + "REFERENCES", "REFERENCING", "REFRESH", "REINDEX", - "RELATIVE_P", + "RELATIVE", "RELEASE", "RENAME", "REPEATABLE", "REPLACE", "REPLICA", "RESET", + "RESPECT", "RESTART", "RESTRICT", + "RETURNING", "RETURNS", "REVOKE", + "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", + "ROW", "ROWS", "RULE", "SAMPLE", "SAVEPOINT", "SCHEMA", "SCHEMAS", + "SCOPE", "SCROLL", "SEARCH", - "SECOND_P", - "SECONDS_P", + "SECOND", + "SECONDS", + "SECRET", "SECURITY", + "SELECT", + "SEMI", "SEQUENCE", "SEQUENCES", "SERIALIZABLE", "SERVER", "SESSION", "SET", + "SETOF", "SETS", "SHARE", "SHOW", + "SIMILAR", "SIMPLE", "SKIP", + "SMALLINT", "SNAPSHOT", - "SQL_P", + "SOME", + "SQL", "STABLE", - "STANDALONE_P", + "STANDALONE", "START", "STATEMENT", "STATISTICS", "STDIN", "STDOUT", "STORAGE", - "STRICT_P", - "STRIP_P", + "STORED", + "STRICT", + "STRIP", + "STRUCT", "SUBSCRIPTION", + "SUBSTRING", + "SUMMARIZE", + "SYMMETRIC", "SYSID", - "SYSTEM_P", + "SYSTEM", + "TABLE", "TABLES", + "TABLESAMPLE", "TABLESPACE", "TEMP", "TEMPLATE", "TEMPORARY", - "TEXT_P", + "TEXT", + "THEN", + "TIES", + "TIME", + "TIMESTAMP", + "TO", + "TRAILING", "TRANSACTION", "TRANSFORM", + "TREAT", "TRIGGER", + "TRIM", + "TRUE", "TRUNCATE", "TRUSTED", - "TYPE_P", - "TYPES_P", + "TRY_CAST", + "TYPE", + "TYPES", "UNBOUNDED", "UNCOMMITTED", "UNENCRYPTED", + "UNION", + "UNIQUE", "UNKNOWN", "UNLISTEN", "UNLOGGED", + "UNPIVOT", "UNTIL", "UPDATE", + "USE", + "USER", + "USING", "VACUUM", "VALID", "VALIDATE", "VALIDATOR", - "VALUE_P", + "VALUE", + "VALUES", + "VARCHAR", + "VARIABLE", + "VARIADIC", "VARYING", - "VERSION_P", + "VERBOSE", + "VERSION", "VIEW", "VIEWS", + "VIRTUAL", "VOLATILE", - "WHITESPACE_P", + "WEEK", + "WEEKS", + "WHEN", + "WHERE", + "WHITESPACE", + "WINDOW", + "WITH", "WITHIN", "WITHOUT", "WORK", "WRAPPER", - "WRITE_P", - "XML_P", - "YEAR_P", - "YEARS_P", - "YES_P", + "WRITE", + "XML", + "XMLATTRIBUTES", + "XMLCONCAT", + "XMLELEMENT", + "XMLEXISTS", + "XMLFOREST", + "XMLNAMESPACES", + "XMLPARSE", + "XMLPI", + "XMLROOT", + "XMLSERIALIZE", + "XMLTABLE", + "YEAR", + "YEARS", + "YES", "ZONE", } diff --git a/tests/materialize/materialize-motherduck/snapshot.json b/tests/materialize/materialize-motherduck/snapshot.json index ddfa30d24..6874474d0 100644 --- a/tests/materialize/materialize-motherduck/snapshot.json +++ b/tests/materialize/materialize-motherduck/snapshot.json @@ -1,6 +1,6 @@ [ "applied.actionDescription", - "\nCREATE TABLE IF NOT EXISTS test_db.main.\"simple\" (\n\tid BIGINT NOT NULL,\n\tcanary VARCHAR NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.duplicate_keys_standard (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tint BIGINT,\n\tstr VARCHAR NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.duplicate_keys_delta (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tint BIGINT,\n\tstr VARCHAR NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.duplicate_keys_delta_exclude_flow_doc (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tint BIGINT,\n\tstr VARCHAR NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.multiple_types (\n\tid BIGINT NOT NULL,\n\tarray_int JSON,\n\tbinary_field VARCHAR,\n\tbool_field BOOLEAN,\n\tfloat_field DOUBLE,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tmultiple JSON,\n\tnested JSON,\n\tnullable_int BIGINT,\n\tstr_field VARCHAR NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.formatted_strings (\n\tid BIGINT NOT NULL,\n\tdate DATE,\n\tdatetime TIMESTAMP WITH TIME ZONE,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tint_and_str HUGEINT,\n\tint_str HUGEINT,\n\tnum_and_str DOUBLE,\n\tnum_str DOUBLE,\n\t\"time\" TIME,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.unsigned_bigint (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tunsigned_bigint HUGEINT,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.deletions (\n\tid BIGINT NOT NULL,\n\t\"_meta/op\" VARCHAR,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\nINSERT INTO test_db.main.flow_materializations_v2 (version, spec, materialization) VALUES ('ffffffffffffffff', '(a-base64-encoded-value)', 'tests/materialize-motherduck/materialize');" + "\nCREATE TABLE IF NOT EXISTS test_db.main.\"simple\" (\n\tid BIGINT NOT NULL,\n\tcanary VARCHAR NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.duplicate_keys_standard (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\t\"int\" BIGINT,\n\tstr VARCHAR NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.duplicate_keys_delta (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\t\"int\" BIGINT,\n\tstr VARCHAR NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.duplicate_keys_delta_exclude_flow_doc (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\t\"int\" BIGINT,\n\tstr VARCHAR NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.multiple_types (\n\tid BIGINT NOT NULL,\n\tarray_int JSON,\n\tbinary_field VARCHAR,\n\tbool_field BOOLEAN,\n\tfloat_field DOUBLE,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tmultiple JSON,\n\tnested JSON,\n\tnullable_int BIGINT,\n\tstr_field VARCHAR NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.formatted_strings (\n\tid BIGINT NOT NULL,\n\tdate DATE,\n\tdatetime TIMESTAMP WITH TIME ZONE,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tint_and_str HUGEINT,\n\tint_str HUGEINT,\n\tnum_and_str DOUBLE,\n\tnum_str DOUBLE,\n\t\"time\" TIME,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.unsigned_bigint (\n\tid BIGINT NOT NULL,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tunsigned_bigint HUGEINT,\n\tflow_document JSON NOT NULL\n);\n\n\nCREATE TABLE IF NOT EXISTS test_db.main.deletions (\n\tid BIGINT NOT NULL,\n\t\"_meta/op\" VARCHAR,\n\tflow_published_at TIMESTAMP WITH TIME ZONE NOT NULL,\n\tflow_document JSON NOT NULL\n);\n\nINSERT INTO test_db.main.flow_materializations_v2 (version, spec, materialization) VALUES ('ffffffffffffffff', '(a-base64-encoded-value)', 'tests/materialize-motherduck/materialize');" ] [ "connectorState",