Navigation Menu

Skip to content

Commit

Permalink
HIVE-20213: Upgrade Calcite to 1.17.0 (Jesus Camacho Rodriguez, revie…
Browse files Browse the repository at this point in the history
…wed by Ashutosh Chauhan)
  • Loading branch information
jcamachor committed Jul 28, 2018
1 parent 188f4ea commit 47dd953
Show file tree
Hide file tree
Showing 35 changed files with 1,105 additions and 1,141 deletions.
Expand Up @@ -46,8 +46,7 @@ public class TestHiveDruidQueryBasedInputFormat extends TestCase {
+ "\"descending\":true,"
+ "\"virtualColumns\":[],"
+ "\"filter\":null,"
+ "\"granularity\":{\"type\":\"period\",\"period\":\"P1D\",\"timeZone\":"
+ "\"America/Los_Angeles\",\"origin\":null},"
+ "\"granularity\":\"DAY\","
+ "\"aggregations\":[],"
+ "\"postAggregations\":[],"
+ "\"context\":null}, [localhost:8082]}]";
Expand Down Expand Up @@ -111,8 +110,7 @@ public class TestHiveDruidQueryBasedInputFormat extends TestCase {
+ "\"intervals\":{\"type\":\"LegacySegmentSpec\",\"intervals\":[\"2012-01-01T08:00:00.000Z/2012-01-03T08:00:00.000Z\"]},"
+ "\"virtualColumns\":[],"
+ "\"filter\":null,"
+ "\"granularity\":{\"type\":\"period\",\"period\":\"P1D\",\"timeZone\":"
+ "\"America/Los_Angeles\",\"origin\":null},"
+ "\"granularity\":\"DAY\","
+ "\"dimensions\":[{\"type\":\"LegacyDimensionSpec\",\"dimension\":\"country\",\"outputName\":\"country\",\"outputType\":\"STRING\"},"
+ "{\"type\":\"LegacyDimensionSpec\",\"dimension\":\"device\",\"outputName\":\"device\",\"outputType\":\"STRING\"}],"
+ "\"aggregations\":[{\"type\":\"longSum\",\"name\":\"total_usage\",\"fieldName\":\"user_count\",\"expression\":null},"
Expand Down
6 changes: 6 additions & 0 deletions jdbc-handler/pom.xml
Expand Up @@ -86,6 +86,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -122,10 +122,10 @@
<apache-directory-clientapi.version>0.1</apache-directory-clientapi.version>
<!-- Include arrow for LlapOutputFormatService -->
<arrow.version>0.8.0</arrow.version>
<avatica.version>1.11.0</avatica.version>
<avatica.version>1.12.0</avatica.version>
<avro.version>1.8.2</avro.version>
<bonecp.version>0.8.0.RELEASE</bonecp.version>
<calcite.version>1.16.0</calcite.version>
<calcite.version>1.17.0</calcite.version>
<datanucleus-api-jdo.version>4.2.4</datanucleus-api-jdo.version>
<datanucleus-core.version>4.1.17</datanucleus-core.version>
<datanucleus-rdbms.version>4.1.19</datanucleus-rdbms.version>
Expand Down
Expand Up @@ -52,7 +52,6 @@
import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveAggregate;
import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin;

import com.google.common.base.Function;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
Expand Down Expand Up @@ -223,11 +222,7 @@ public void onMatch(RelOptRuleCall call) {

// Update condition
final Mapping mapping = (Mapping) Mappings.target(
new Function<Integer, Integer>() {
public Integer apply(Integer a0) {
return map.get(a0);
}
},
map::get,
join.getRowType().getFieldCount(),
belowOffset);
final RexNode newCondition =
Expand Down
8 changes: 4 additions & 4 deletions ql/src/test/results/clientpositive/druid/druid_basic2.q.out
Expand Up @@ -736,7 +736,7 @@ STAGE PLANS:
properties:
druid.fieldNames robot,floor_day,$f3,$f4,(tok_function tok_int (tok_table_or_col robot))
druid.fieldTypes string,timestamp with local time zone,float,double,int
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"},{"type":"default","dimension":"language","outputName":"language","outputType":"STRING"},{"type":"extraction","dimension":"__time","outputName":"floor_day","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","granularity":{"type":"period","period":"P1D","timeZone":"US/Pacific"},"timeZone":"US/Pacific","locale":"und"}}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"(tok_function tok_int (tok_table_or_col robot))","direction":"ascending","dimensionOrder":"numeric"},{"dimension":"$f3","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleMax","name":"$f3","fieldName":"added"},{"type":"doubleSum","name":"$f4","fieldName":"delta"}],"postAggregations":[{"type":"expression","name":"(tok_function tok_int (tok_table_or_col robot))","expression":"CAST(\"robot\", 'LONG')"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"},{"type":"default","dimension":"language","outputName":"language","outputType":"STRING"},{"type":"extraction","dimension":"__time","outputName":"floor_day","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","granularity":{"type":"period","period":"P1D","timeZone":"US/Pacific"},"timeZone":"UTC","locale":"und"}}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"(tok_function tok_int (tok_table_or_col robot))","direction":"ascending","dimensionOrder":"numeric"},{"dimension":"$f3","direction":"descending","dimensionOrder":"numeric"}]},"aggregations":[{"type":"doubleMax","name":"$f3","fieldName":"added"},{"type":"doubleSum","name":"$f4","fieldName":"delta"}],"postAggregations":[{"type":"expression","name":"(tok_function tok_int (tok_table_or_col robot))","expression":"CAST(\"robot\", 'LONG')"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"]}
druid.query.type groupBy
GatherStats: false
Select Operator
Expand Down Expand Up @@ -801,7 +801,7 @@ STAGE PLANS:
properties:
druid.fieldNames robot,floor_day
druid.fieldTypes string,timestamp with local time zone
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"},{"type":"extraction","dimension":"__time","outputName":"floor_day","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","granularity":{"type":"period","period":"P1D","timeZone":"US/Pacific"},"timeZone":"US/Pacific","locale":"und"}}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"lexicographic"}]},"aggregations":[],"intervals":["1999-11-01T08:00:00.000Z/1999-11-10T08:00:00.001Z"]}
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"},{"type":"extraction","dimension":"__time","outputName":"floor_day","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","granularity":{"type":"period","period":"P1D","timeZone":"US/Pacific"},"timeZone":"UTC","locale":"und"}}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"lexicographic"}]},"aggregations":[],"intervals":["1999-11-01T08:00:00.000Z/1999-11-10T08:00:00.001Z"]}
druid.query.type groupBy
Select Operator
expressions: robot (type: string), floor_day (type: timestamp with local time zone)
Expand Down Expand Up @@ -837,7 +837,7 @@ STAGE PLANS:
properties:
druid.fieldNames extract,robot
druid.fieldTypes timestamp with local time zone,string
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"extraction","dimension":"__time","outputName":"extract","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","timeZone":"US/Pacific"}},{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"lexicographic"}]},"aggregations":[],"intervals":["1999-11-01T08:00:00.000Z/1999-11-10T08:00:00.001Z"]}
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"extraction","dimension":"__time","outputName":"extract","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","timeZone":"UTC"}},{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"lexicographic"}]},"aggregations":[],"intervals":["1999-11-01T08:00:00.000Z/1999-11-10T08:00:00.001Z"]}
druid.query.type groupBy
Select Operator
expressions: robot (type: string), extract (type: timestamp with local time zone)
Expand Down Expand Up @@ -873,7 +873,7 @@ STAGE PLANS:
properties:
druid.fieldNames robot,floor_day
druid.fieldTypes string,timestamp with local time zone
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"},{"type":"extraction","dimension":"__time","outputName":"floor_day","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","granularity":{"type":"period","period":"P1D","timeZone":"US/Pacific"},"timeZone":"US/Pacific","locale":"und"}}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"lexicographic"}]},"aggregations":[],"intervals":["1999-11-01T08:00:00.000Z/1999-11-10T08:00:00.001Z"]}
druid.query.json {"queryType":"groupBy","dataSource":"wikipedia","granularity":"all","dimensions":[{"type":"default","dimension":"robot","outputName":"robot","outputType":"STRING"},{"type":"extraction","dimension":"__time","outputName":"floor_day","extractionFn":{"type":"timeFormat","format":"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","granularity":{"type":"period","period":"P1D","timeZone":"US/Pacific"},"timeZone":"UTC","locale":"und"}}],"limitSpec":{"type":"default","limit":10,"columns":[{"dimension":"robot","direction":"ascending","dimensionOrder":"lexicographic"}]},"aggregations":[],"intervals":["1999-11-01T08:00:00.000Z/1999-11-10T08:00:00.001Z"]}
druid.query.type groupBy
Select Operator
expressions: robot (type: string), floor_day (type: timestamp with local time zone)
Expand Down

0 comments on commit 47dd953

Please sign in to comment.