1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.expreval.expr.literal;
22
23 import org.apache.expreval.client.InternalErrorException;
24 import org.apache.expreval.expr.MultipleExpressionContext;
25 import org.apache.expreval.expr.node.GenericValue;
26 import org.apache.hadoop.hbase.client.Result;
27 import org.apache.hadoop.hbase.filter.Filter;
28 import org.apache.hadoop.hbase.hbql.client.HBqlException;
29 import org.apache.hadoop.hbase.hbql.impl.AggregateValue;
30 import org.apache.hadoop.hbase.hbql.impl.HConnectionImpl;
31 import org.apache.hadoop.hbase.hbql.impl.InvalidServerFilterException;
32
33 public class DefaultKeyword implements GenericValue {
34
35 public void setExpressionContext(final MultipleExpressionContext context) {
36
37 }
38
39 public Object getValue(final HConnectionImpl conn, final Object object) {
40 return null;
41 }
42
43 public GenericValue getOptimizedValue() {
44 return null;
45 }
46
47 public Class<? extends GenericValue> validateTypes(final GenericValue parentExpr,
48 final boolean allowCollections) {
49 return DefaultKeyword.class;
50 }
51
52 public boolean isAConstant() {
53 return true;
54 }
55
56 public boolean isDefaultKeyword() {
57 return true;
58 }
59
60 public boolean isAnAggregateValue() {
61 return false;
62 }
63
64 public void initAggregateValue(final AggregateValue aggregateValue) throws HBqlException {
65 throw new InternalErrorException("Not applicable");
66 }
67
68 public void applyResultToAggregateValue(final AggregateValue aggregateValue,
69 final Result result) throws HBqlException {
70 throw new InternalErrorException("Not applicable");
71 }
72
73 public boolean hasAColumnReference() {
74 return false;
75 }
76
77 public boolean isAColumnReference() {
78 return false;
79 }
80
81 public String asString() {
82 return "DEFAULT";
83 }
84
85 public void reset() {
86
87 }
88
89 public Filter getFilter() throws HBqlException {
90 throw new InvalidServerFilterException();
91 }
92 }