forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCitusCommon.java
More file actions
93 lines (85 loc) · 4.77 KB
/
CitusCommon.java
File metadata and controls
93 lines (85 loc) · 4.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package sqlancer.citus.gen;
import java.util.ArrayList;
import java.util.List;
import sqlancer.citus.CitusBugs;
import sqlancer.common.query.ExpectedErrors;
public final class CitusCommon {
private CitusCommon() {
}
public static List<String> getCitusErrors() {
// not supported by Citus
ArrayList<String> errors = new ArrayList<>();
errors.add("failed to evaluate partition key in insert");
errors.add("cannot perform an INSERT without a partition column value");
errors.add("cannot perform an INSERT with NULL in the partition column");
errors.add("recursive CTEs are not supported in distributed queries");
errors.add("could not run distributed query with GROUPING SETS, CUBE, or ROLLUP");
errors.add("Subqueries in HAVING cannot refer to outer query");
errors.add("non-IMMUTABLE functions are not allowed in the RETURNING clause");
errors.add("functions used in UPDATE queries on distributed tables must not be VOLATILE");
errors.add("STABLE functions used in UPDATE queries cannot be called with column references");
errors.add(
"functions used in the WHERE clause of modification queries on distributed tables must not be VOLATILE");
errors.add("cannot execute ADD CONSTRAINT command with other subcommands");
errors.add("cannot execute ALTER TABLE command involving partition column");
errors.add("could not run distributed query with FOR UPDATE/SHARE commands");
errors.add("is not a regular, foreign or partitioned table");
errors.add("must be a distributed table or a reference table");
errors.add("creating unique indexes on non-partition columns is currently unsupported");
errors.add("modifying the partition value of rows is not allowed");
errors.add("creating unique indexes on non-partition columns is currently unsupported");
errors.add("Distributed relations must not use GENERATED ... AS IDENTITY");
errors.add("cannot drop multiple distributed objects in a single command");
errors.add("is not distributed");
errors.add("cannot create constraint on");
errors.add("cannot create foreign key constraint"); // SET NULL or SET DEFAULT is not supported in ON DELETE
// operation when distribution key is included in the
// foreign key constraint
errors.add("cannot modify views over distributed tables");
// not supported by Citus (restrictions on SELECT queries)
errors.add(
"complex joins are only supported when all distributed tables are co-located and joined on their distribution columns");
errors.add(
"complex joins are only supported when all distributed tables are joined on their distribution columns with equal operator");
errors.add("cannot perform distributed planning on this query");
errors.add("cannot pushdown the subquery");
// see https://github.com/sqlancer/sqlancer/issues/215
errors.add("direct joins between distributed and local tables are not supported");
errors.add("unlogged columnar tables are not supported");
errors.add("UPDATE and CTID scans not supported for ColumnarScan");
errors.add("indexes not supported for columnar tables");
errors.add("invalid byte sequence for encoding \"UTF8\": 0x00");
errors.add("columnar_tuple_insert_speculative not implemented");
errors.add("row field count is 1, expected 2");
errors.add("incorrect binary data format");
errors.add("invalid sign in external \"numeric\" value");
errors.add("Foreign keys and AFTER ROW triggers are not supported for columnar tables");
// current errors in Citus (to be removed once fixed)
if (CitusBugs.bug3957) {
errors.add("unrecognized node type: 127");
}
if (CitusBugs.bug3980 || CitusBugs.bug3987 || CitusBugs.bug4019) {
errors.add("syntax error at or near");
}
if (CitusBugs.bug3982) {
errors.add("failed to find conversion function from unknown to text");
errors.add("invalid input syntax for");
}
if (CitusBugs.bug4013) {
errors.add("ERROR: LIMIT must not be negative");
}
if (CitusBugs.bug3981) {
errors.add("value too long for type");
}
if (CitusBugs.bug4014) {
errors.add("is ambiguous");
}
if (CitusBugs.bug4079) {
errors.add("aggregate function calls cannot be nested");
}
return errors;
}
public static void addCitusErrors(ExpectedErrors errors) {
errors.addAll(getCitusErrors());
}
}