-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathHiveJoin.java
More file actions
48 lines (37 loc) · 1.24 KB
/
HiveJoin.java
File metadata and controls
48 lines (37 loc) · 1.24 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
package sqlancer.hive.ast;
import sqlancer.common.ast.newast.Join;
import sqlancer.hive.HiveSchema.HiveColumn;
import sqlancer.hive.HiveSchema.HiveTable;
public class HiveJoin implements HiveExpression, Join<HiveExpression, HiveTable, HiveColumn> {
private final HiveTableReference leftTable;
private final HiveTableReference rightTable;
private final JoinType joinType;
private HiveExpression onClause;
// TODO: test map-join optimization
public enum JoinType {
INNER, LEFT_OUTER, RIGHT_OUTER, FULL_OUTER, LEFT_SEMI, CROSS;
}
public HiveJoin(HiveTableReference leftTable, HiveTableReference rightTable, JoinType joinType,
HiveExpression onClause) {
this.leftTable = leftTable;
this.rightTable = rightTable;
this.joinType = joinType;
this.onClause = onClause;
}
public HiveTableReference getLeftTable() {
return leftTable;
}
public HiveTableReference getRightTable() {
return rightTable;
}
public JoinType getJoinType() {
return joinType;
}
public HiveExpression getOnClause() {
return onClause;
}
@Override
public void setOnClause(HiveExpression onClause) {
this.onClause = onClause;
}
}