misc.python.materialize.sqlsmith
1# Copyright Materialize, Inc. and contributors. All rights reserved. 2# 3# Use of this software is governed by the Business Source License 4# included in the LICENSE file at the root of this repository. 5# 6# As of the Change Date specified in that file, in accordance with 7# the Business Source License, use of this software will be governed 8# by the Apache License, Version 2.0. 9 10# These are only errors which have no associated issues since they are not 11# considered product bugs, but SQLsmith generating bad queries. Use ci-regexp 12# in Github issues for actual product bugs. 13known_errors = [ 14 "no connection to the server", # Expected AFTER a crash, the query before this is interesting, not the ones after 15 "failed: Connection refused", # Expected AFTER a crash, the query before this is interesting, not the ones after 16 "could not translate host name", # Expected AFTER a crash, the query before this is interesting, not the ones after 17 "canceling statement due to statement timeout", 18 "value too long for type", 19 "list_agg on char not yet supported", 20 "does not allow subqueries", 21 "function array_remove(", # insufficient type system, parameter types have to match 22 "function array_cat(", # insufficient type system, parameter types have to match 23 "function array_position(", # insufficient type system, parameter types have to match 24 "function list_append(", # insufficient type system, parameter types have to match 25 "function list_prepend(", # insufficient type system, parameter types have to match 26 "function list_cat(", # insufficient type system, parameter types have to match 27 "does not support implicitly casting from", 28 "aggregate functions that refer exclusively to outer columns not yet supported", # https://github.com/MaterializeInc/database-issues/issues/1163 29 "permission denied for", # expected for the unprivileged-role instance 30 "must be owner of", # expected for the unprivileged-role instance 31 "must be a superuser", # expected for the unprivileged-role instance 32 "range lower bound must be less than or equal to range upper bound", 33 "violates not-null constraint", 34 "division by zero", 35 "zero raised to a negative power is undefined", 36 "operator does not exist", # For list types 37 "couldn't parse role id", 38 "mz_aclitem grantor cannot be PUBLIC role", 39 "unrecognized privilege type:", 40 "cannot return complex numbers", 41 "statement batch size cannot exceed", 42 "length must be nonnegative", 43 "is only defined for finite arguments", 44 "more than one record produced in subquery", 45 "invalid range bound flags", 46 "invalid input syntax for type ", 47 "invalid regular expression", 48 "invalid escape string", 49 "invalid hash algorithm", 50 "is defined for numbers greater than or equal to", 51 "is not defined for zero", 52 "is not defined for negative numbers", 53 "requested character too large for encoding", 54 "requested character not valid for encoding", 55 "internal error: unrecognized configuration parameter", 56 "invalid encoding name", 57 "invalid time zone", 58 "value out of range: overflow", 59 "value out of range: underflow", 60 "LIKE pattern exceeds maximum length", 61 "negative substring length not allowed", 62 "cannot take square root of a negative number", 63 "timestamp units not yet supported", 64 "step size cannot equal zero", 65 "stride must be greater than zero", 66 "timestamp out of range", 67 "date out of range", 68 "integer out of range", 69 "unterminated escape sequence in LIKE", 70 "null character not permitted", 71 "is defined for numbers between", 72 "field position must be greater than zero", 73 "array_fill on ", # Not yet supported 74 "must not be null", # Expected with array_fill, array_position 75 "' not recognized", # Expected, see https://github.com/MaterializeInc/database-issues/issues/5253 76 "must appear in the GROUP BY clause or be used in an aggregate function", 77 "Expected joined table, found", # Should fix for multi table join 78 "Expected ON, or USING after JOIN, found", # Should fix for multi table join 79 "but expression is of type", # Should fix, but only happens rarely 80 "could not convert type ", # CASE/coalesce, the generator's type metadata for polymorphic functions is coarser than real inference 81 "could not determine polymorphic type", # untyped literals for pseudo-typed arguments 82 "operator does not exist: map", # Should fix, but only happens rarely 83 "result exceeds max size of", # Seems expected with huge queries 84 "expected expression, but found reserved keyword", # Should fix, but only happens rarely with subqueries 85 "Expected right parenthesis, found left parenthesis", # Should fix, but only happens rarely with cast+coalesce 86 "invalid selection: every relation leaf must be a writable user table", # Expected when using catalog tables 87 "Unsupported temporal predicate", # Expected, see https://github.com/MaterializeInc/database-issues/issues/5288 88 "Unsupported temporal operation: NotEq", 89 "Unsupported binary temporal operation: NotEq", 90 "OneShot plan has temporal constraints", # Expected, see https://github.com/MaterializeInc/database-issues/issues/5288 91 "string is not a valid identifier:", # Expected in parse_ident & quote_ident 92 "invalid datepart", 93 "pg_cancel_backend in this position not yet supported", 94 "unrecognized configuration parameter", 95 "numeric field overflow", 96 "bigint out of range", 97 "smallint out of range", 98 "uint8 out of range", 99 "uint4 out of range", 100 "uint2 out of range", 101 "interval out of range", 102 "timezone interval must not contain months or years", 103 "not supported for type date", 104 "not supported for type time", 105 " cannot be matched", # CASE/coalesce/set operation type unification, the generator's type system is coarser than the real one 106 "but query returns types", # WITH MUTUALLY RECURSIVE bindings, the generator's type metadata can disagree with inference 107 "is out of range for type numeric: exceeds maximum precision", 108 "is out of range for type date", 109 "is out of range for type timestamp", 110 " does not support casting from ", # CAST/SET clause/CASE, TODO: Improve type system 111 "requested length too large", 112 "number of columns must be a positive integer literal", 113 "regexp_extract requires a string literal as its first argument", 114 "regex parse error", 115 "out of valid range", 116 '" does not exist', # role does not exist 117 "attempt to create relation with too many columns", 118 "target replica failed or was dropped", # expected on replica OoMs with materialize#21587 119 "cannot materialize call to", # create materialized view on some internal views 120 "arrays must not contain null values", # aclexplode, mz_aclexplode 121 "OVER clause not allowed on", # window functions 122 "cannot reference pseudo type", 123 "window functions are not allowed in table function arguments", # TODO: Remove when database-issues#6317 is implemented 124 "window functions are not allowed in OR argument", # wrong error message 125 "window functions are not allowed in AND argument", # wrong error message 126 "window functions are not allowed in aggregate function", 127 "invalid IANA Time Zone Database identifier", 128 "Invalid LIMIT clause", 129 "LIMIT must not be negative", 130 "materialized view objects cannot depend on log sources", # explain create materialized view 131 "aggregate functions are not allowed in OR argument", 132 "aggregate functions are not allowed in AND argument", 133 "aggregate functions are not allowed in WHERE clause", 134 "aggregate functions are not allowed in table function arguments", 135 "aggregate functions are not allowed in LIMIT", 136 "nested aggregate functions are not allowed", 137 "function map_build(text list) does not exist", 138 "timestamp cannot be NaN", 139 "exceeded recursion limit of 2048", 140 "key cannot be null", # expected, see PR materialize#25941 141 "regexp_extract must specify at least one capture group", 142 "array_fill with arrays not yet supported", 143 "not yet supported", 144 "Window function performance issue: `reduce_unnest_list_fusion` failed", # TODO: Remove when SQL-640 is fixed 145 "WITH ORDINALITY or ROWS FROM with ", 146 "invalid normalization form", # Expected with https://github.com/MaterializeInc/materialize/pull/33507 147 "invalid catalog JSON", # `parse_catalog_*` function invoked with an invalid JSON object 148]
known_errors =
['no connection to the server', 'failed: Connection refused', 'could not translate host name', 'canceling statement due to statement timeout', 'value too long for type', 'list_agg on char not yet supported', 'does not allow subqueries', 'function array_remove(', 'function array_cat(', 'function array_position(', 'function list_append(', 'function list_prepend(', 'function list_cat(', 'does not support implicitly casting from', 'aggregate functions that refer exclusively to outer columns not yet supported', 'permission denied for', 'must be owner of', 'must be a superuser', 'range lower bound must be less than or equal to range upper bound', 'violates not-null constraint', 'division by zero', 'zero raised to a negative power is undefined', 'operator does not exist', "couldn't parse role id", 'mz_aclitem grantor cannot be PUBLIC role', 'unrecognized privilege type:', 'cannot return complex numbers', 'statement batch size cannot exceed', 'length must be nonnegative', 'is only defined for finite arguments', 'more than one record produced in subquery', 'invalid range bound flags', 'invalid input syntax for type ', 'invalid regular expression', 'invalid escape string', 'invalid hash algorithm', 'is defined for numbers greater than or equal to', 'is not defined for zero', 'is not defined for negative numbers', 'requested character too large for encoding', 'requested character not valid for encoding', 'internal error: unrecognized configuration parameter', 'invalid encoding name', 'invalid time zone', 'value out of range: overflow', 'value out of range: underflow', 'LIKE pattern exceeds maximum length', 'negative substring length not allowed', 'cannot take square root of a negative number', 'timestamp units not yet supported', 'step size cannot equal zero', 'stride must be greater than zero', 'timestamp out of range', 'date out of range', 'integer out of range', 'unterminated escape sequence in LIKE', 'null character not permitted', 'is defined for numbers between', 'field position must be greater than zero', 'array_fill on ', 'must not be null', "' not recognized", 'must appear in the GROUP BY clause or be used in an aggregate function', 'Expected joined table, found', 'Expected ON, or USING after JOIN, found', 'but expression is of type', 'could not convert type ', 'could not determine polymorphic type', 'operator does not exist: map', 'result exceeds max size of', 'expected expression, but found reserved keyword', 'Expected right parenthesis, found left parenthesis', 'invalid selection: every relation leaf must be a writable user table', 'Unsupported temporal predicate', 'Unsupported temporal operation: NotEq', 'Unsupported binary temporal operation: NotEq', 'OneShot plan has temporal constraints', 'string is not a valid identifier:', 'invalid datepart', 'pg_cancel_backend in this position not yet supported', 'unrecognized configuration parameter', 'numeric field overflow', 'bigint out of range', 'smallint out of range', 'uint8 out of range', 'uint4 out of range', 'uint2 out of range', 'interval out of range', 'timezone interval must not contain months or years', 'not supported for type date', 'not supported for type time', ' cannot be matched', 'but query returns types', 'is out of range for type numeric: exceeds maximum precision', 'is out of range for type date', 'is out of range for type timestamp', ' does not support casting from ', 'requested length too large', 'number of columns must be a positive integer literal', 'regexp_extract requires a string literal as its first argument', 'regex parse error', 'out of valid range', '" does not exist', 'attempt to create relation with too many columns', 'target replica failed or was dropped', 'cannot materialize call to', 'arrays must not contain null values', 'OVER clause not allowed on', 'cannot reference pseudo type', 'window functions are not allowed in table function arguments', 'window functions are not allowed in OR argument', 'window functions are not allowed in AND argument', 'window functions are not allowed in aggregate function', 'invalid IANA Time Zone Database identifier', 'Invalid LIMIT clause', 'LIMIT must not be negative', 'materialized view objects cannot depend on log sources', 'aggregate functions are not allowed in OR argument', 'aggregate functions are not allowed in AND argument', 'aggregate functions are not allowed in WHERE clause', 'aggregate functions are not allowed in table function arguments', 'aggregate functions are not allowed in LIMIT', 'nested aggregate functions are not allowed', 'function map_build(text list) does not exist', 'timestamp cannot be NaN', 'exceeded recursion limit of 2048', 'key cannot be null', 'regexp_extract must specify at least one capture group', 'array_fill with arrays not yet supported', 'not yet supported', 'Window function performance issue: `reduce_unnest_list_fusion` failed', 'WITH ORDINALITY or ROWS FROM with ', 'invalid normalization form', 'invalid catalog JSON']