diff options
author | Jinfeng Ni <jni@maprtech.com> | 2014-02-26 17:04:37 -0800 |
---|---|---|
committer | Jacques Nadeau <jacques@apache.org> | 2014-04-19 18:07:08 -0700 |
commit | 6b517daad2a817231df9959f2f3e5c53bd728117 (patch) | |
tree | 00f52cb642627453d3cfcb790d8392340d5000fc /common | |
parent | 22c4190715d081bf5c4c684c5d67131e973c59f2 (diff) |
DRILL-450: Add exchange rules, move from BasicOptimizer to Optiq
Diffstat (limited to 'common')
-rw-r--r-- | common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprLexer.g | 27 | ||||
-rw-r--r-- | common/src/main/java/org/apache/drill/common/logical/data/Order.java | 6 |
2 files changed, 17 insertions, 16 deletions
diff --git a/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprLexer.g b/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprLexer.g index 05fb32e9d..78c356abc 100644 --- a/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprLexer.g +++ b/common/src/main/antlr3/org/apache/drill/common/expression/parser/ExprLexer.g @@ -40,19 +40,20 @@ Nullable: 'nullable'; Repeat: 'repeat'; As: 'as'; -INT : 'int'; -BIGINT : 'bigint'; -FLOAT4 : 'float4'; -FLOAT8 : 'float8'; -VARCHAR : 'varchar'; -VARBINARY: 'varbinary'; -DATE : 'date'; -TIMESTAMP: 'timestamp'; -TIME : 'time'; -TIMESTAMPTZ: 'timestamptz'; -INTERVAL : 'interval'; -INTERVALYEAR : 'intervalyear'; -INTERVALDAY : 'intervalday'; +INT : 'int' | 'INT'; +BIGINT : 'bigint' | 'BIGINT'; +FLOAT4 : 'float4' | 'FLOAT4'; +FLOAT8 : 'float8' | 'FLOAT8'; +VARCHAR : 'varchar' | 'VARCHAR'; +VARBINARY: 'varbinary' | 'VARBINARY'; +DATE : 'date' | 'DATE'; +TIMESTAMP: 'timestamp' | 'TIMESTAMP'; +TIME : 'time' | 'TIME'; +TIMESTAMPTZ: 'timestamptz' | 'TIMESTAMPTZ'; +INTERVAL : 'interval' | 'INTERVAL'; +INTERVALYEAR : 'intervalyear' | 'INTERVALYEAR'; +INTERVALDAY : 'intervalday' | 'INTERVALDAY'; + Or : '||' | 'or' | 'OR' | 'Or'; And : '&&' | 'and' | 'AND' ; diff --git a/common/src/main/java/org/apache/drill/common/logical/data/Order.java b/common/src/main/java/org/apache/drill/common/logical/data/Order.java index 3c864b027..06f114492 100644 --- a/common/src/main/java/org/apache/drill/common/logical/data/Order.java +++ b/common/src/main/java/org/apache/drill/common/logical/data/Order.java @@ -100,7 +100,7 @@ public class Order extends SingleInputOperator { public String getOrder() { switch(direction){ - case Descending: return "DESC"; + case DESCENDING: return "DESC"; default: return "ASC"; } } @@ -140,10 +140,10 @@ public class Order extends SingleInputOperator { } public static Direction getDirectionFromString(String direction){ - return "DESC".equalsIgnoreCase(direction) ? Direction.Descending : Direction.Ascending; + return "DESC".equalsIgnoreCase(direction) ? Direction.DESCENDING : Direction.ASCENDING; } public static String getStringFromDirection(Direction direction){ - return direction == Direction.Descending ? "DESC" : "ASC"; + return direction == Direction.DESCENDING ? "DESC" : "ASC"; } } |