-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathHiveErrors.java
More file actions
40 lines (28 loc) · 1 KB
/
HiveErrors.java
File metadata and controls
40 lines (28 loc) · 1 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
package sqlancer.hive;
import java.util.ArrayList;
import java.util.List;
import sqlancer.common.query.ExpectedErrors;
public final class HiveErrors {
private HiveErrors() {
}
public static List<String> getExpressionErrors() {
ArrayList<String> errors = new ArrayList<>();
errors.add("cannot recognize input near");
errors.add("Argument type mismatch");
errors.add("Error while compiling statement");
return errors;
}
public static void addExpressionErrors(ExpectedErrors errors) {
errors.addAll(getExpressionErrors());
}
public static List<String> getInsertErrors() {
ArrayList<String> errors = new ArrayList<>();
errors.add("Either CHECK or NOT NULL constraint violated!");
errors.add("Error running query");
errors.add("is different from preceding arguments");
return errors;
}
public static void addInsertErrors(ExpectedErrors errors) {
errors.addAll(getInsertErrors());
}
}