-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathDatabendColumnValue.java
More file actions
31 lines (23 loc) · 925 Bytes
/
DatabendColumnValue.java
File metadata and controls
31 lines (23 loc) · 925 Bytes
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
package sqlancer.databend.ast;
import sqlancer.common.ast.newast.ColumnReferenceNode;
import sqlancer.databend.DatabendSchema.DatabendColumn;
import sqlancer.databend.DatabendSchema.DatabendDataType;
public class DatabendColumnValue extends ColumnReferenceNode<DatabendExpression, DatabendColumn>
implements DatabendExpression {
private final DatabendConstant expectedValue;
public DatabendColumnValue(DatabendColumn column, DatabendConstant value) {
super(column);
this.expectedValue = value;
}
@Override
public DatabendConstant getExpectedValue() {
return expectedValue;
}
@Override
public DatabendDataType getExpectedType() {
return getColumn().getType().getPrimitiveDataType();
}
public static DatabendColumnValue create(DatabendColumn column, DatabendConstant value) {
return new DatabendColumnValue(column, value);
}
}