sqlsmith.py 7.8 KB

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