forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFelderaJoin.java
More file actions
51 lines (40 loc) · 1.4 KB
/
FelderaJoin.java
File metadata and controls
51 lines (40 loc) · 1.4 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
package sqlancer.feldera.ast;
import sqlancer.Randomly;
import sqlancer.common.ast.newast.Join;
import sqlancer.feldera.FelderaSchema;
public class FelderaJoin
implements FelderaExpression, Join<FelderaExpression, FelderaSchema.FelderaTable, FelderaSchema.FelderaColumn> {
private final FelderaTableReference leftTable;
private final FelderaTableReference rightTable;
private final FelderaJoinType joinType;
private FelderaExpression onCondition;
public enum FelderaJoinType {
INNER, NATURAL, LEFT, RIGHT;
public static FelderaJoinType getRandom() {
return Randomly.fromOptions(values());
}
}
public FelderaJoin(FelderaTableReference leftTable, FelderaTableReference rightTable, FelderaJoinType joinType,
FelderaExpression whereCondition) {
this.leftTable = leftTable;
this.rightTable = rightTable;
this.joinType = joinType;
this.onCondition = whereCondition;
}
public FelderaTableReference getLeftTable() {
return leftTable;
}
public FelderaTableReference getRightTable() {
return rightTable;
}
public FelderaJoinType getJoinType() {
return joinType;
}
public FelderaExpression getOnCondition() {
return onCondition;
}
@Override
public void setOnClause(FelderaExpression onClause) {
this.onCondition = onClause;
}
}