-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathDorisErrors.java
More file actions
85 lines (68 loc) · 2.76 KB
/
DorisErrors.java
File metadata and controls
85 lines (68 loc) · 2.76 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
package sqlancer.doris;
import java.util.ArrayList;
import java.util.List;
import sqlancer.common.query.ExpectedErrors;
public final class DorisErrors {
private DorisErrors() {
}
public static List<String> getExpressionErrors() {
ArrayList<String> errors = new ArrayList<>();
// SQL syntax error
errors.add("Syntax error");
errors.add("Please check your sql, we meet an error when parsing");
errors.add("but returns type");
errors.add("is not a number");
// Not in line with Doris' logic
errors.add("Unexpected exception: null");
errors.add("Cross join can't be used with ON clause");
errors.add("BetweenPredicate needs to be rewritten into a CompoundPredicate");
errors.add("can't be assigned to some PlanNode");
errors.add("can not cast from origin type");
errors.add("not produced by aggregation output");
errors.add("cannot combine"); // cannot combine SELECT DISTINCT with aggregate functions or GROUP BY
errors.add("Invalid type");
errors.add("cannot be cast to");
// functions
errors.add("No matching function with signature");
errors.add("Invalid number format");
errors.add("group_concat requires");
errors.add("function's argument should be");
errors.add("requires a numeric parameter");
errors.add("out of bounds");
errors.add("function do not support");
errors.add("parameter must be");
errors.add("Not supported input arguments types");
errors.add("No matching function with signature");
errors.add("function");
errors.add("Invalid");
errors.add("Incorrect");
// regex
// To avoid bugs
if (DorisBugs.bug19370) {
errors.add("failed to initialize storage");
}
if (DorisBugs.bug19374) {
errors.add("the size of the result sets mismatch");
}
if (DorisBugs.bug19611) {
errors.add("Duplicated inline view column alias");
}
errors.add("Arithmetic overflow");
return errors;
}
public static void addExpressionErrors(ExpectedErrors errors) {
errors.addAll(getExpressionErrors());
}
public static List<String> getInsertErrors() {
ArrayList<String> errors = new ArrayList<>();
errors.add("Insert has filtered data in strict mode");
errors.add("Only value columns of unique table could be updated");
errors.add("Only unique olap table could be updated");
errors.add("Number out of range");
errors.add("Arithmetic overflow");
return errors;
}
public static void addInsertErrors(ExpectedErrors errors) {
errors.addAll(getInsertErrors());
}
}