Repository: asterixdb Updated Branches: refs/heads/master e400b117c -> 7a0ba78d3
ASTERIXDB-1789: fix an accessor that is used by Hash Table - Fix an accesor that is used by SerializableHashTable class. This accessor class is required to calculate the original hash value of a tuple when compacting the hash table. Change-Id: I74b6de8f189e841c16735dbd63f13892bbd61c20 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1734 Reviewed-by: Yingyi Bu <buyin...@gmail.com> Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> BAD: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/7a0ba78d Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/7a0ba78d Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/7a0ba78d Branch: refs/heads/master Commit: 7a0ba78d3bc03e064f8a9909daa50822a47003aa Parents: e400b11 Author: Taewoo Kim <wangs...@yahoo.com> Authored: Wed May 10 23:38:03 2017 -0700 Committer: Taewoo Kim <wangs...@gmail.com> Committed: Thu May 11 09:07:10 2017 -0700 ---------------------------------------------------------------------- .../resources/benchmarks/tpch/queries/q7.sqlpp | 58 ++++++++++++++++++++ .../benchmarks/tpch/queries/q7.sqlpp.dis | 58 -------------------- .../buffermanager/TupleInFrameListAccessor.java | 7 +-- 3 files changed, 61 insertions(+), 62 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7a0ba78d/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp b/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp new file mode 100644 index 0000000..bc6a7a6 --- /dev/null +++ b/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Error: sporadically dead node. + +USE tpch; + +WITH q7_volume_shipping_tmp AS +( + SELECT n1.n_name AS supp_nation, + n2.n_name AS cust_nation, + n1.n_nationkey AS s_nationkey, + n2.n_nationkey AS c_nationkey + FROM Nation as n1, + Nation as n2 + WHERE (n1.n_name='FRANCE' AND n2.n_name='GERMANY') OR (n1.n_name='GERMANY' AND n2.n_name='FRANCE') +) + +SELECT supp_nation, cust_nation, l_year, sum(volume) AS revenue +FROM + ( + SELECT t.supp_nation, t.cust_nation, GET_YEAR(l3.l_shipdate) AS l_year, + l3.l_extendedprice * (1 - l3.l_discount) AS volume + FROM ( + SELECT l2.l_shipdate, l2.l_extendedprice, l2.l_discount, l2.c_nationkey, s.s_nationkey + FROM Supplier s JOIN + ( + SELECT l1.l_shipdate, l1.l_extendedprice, l1.l_discount, l1.l_suppkey, c.c_nationkey + FROM Customer c JOIN + ( + SELECT l.l_shipdate, l.l_extendedprice, l.l_discount, l.l_suppkey, o.o_custkey + FROM Orders o + JOIN LineItem l ON o.o_orderkey = l.l_orderkey AND l.l_shipdate >= '1995-01-01' + AND l.l_shipdate <= '1996-12-31' + ) l1 ON c.c_custkey = l1.o_custkey + ) l2 ON s.s_suppkey = l2.l_suppkey + ) l3 + JOIN q7_volume_shipping_tmp t + ON t.c_nationkey = l3.c_nationkey AND t.s_nationkey = l3.s_nationkey + ) shipping +GROUP BY supp_nation, cust_nation, l_year +ORDER BY supp_nation, cust_nation, l_year; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7a0ba78d/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp.dis ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp.dis b/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp.dis deleted file mode 100644 index bc6a7a6..0000000 --- a/asterixdb/asterix-benchmark/src/main/resources/benchmarks/tpch/queries/q7.sqlpp.dis +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -// Error: sporadically dead node. - -USE tpch; - -WITH q7_volume_shipping_tmp AS -( - SELECT n1.n_name AS supp_nation, - n2.n_name AS cust_nation, - n1.n_nationkey AS s_nationkey, - n2.n_nationkey AS c_nationkey - FROM Nation as n1, - Nation as n2 - WHERE (n1.n_name='FRANCE' AND n2.n_name='GERMANY') OR (n1.n_name='GERMANY' AND n2.n_name='FRANCE') -) - -SELECT supp_nation, cust_nation, l_year, sum(volume) AS revenue -FROM - ( - SELECT t.supp_nation, t.cust_nation, GET_YEAR(l3.l_shipdate) AS l_year, - l3.l_extendedprice * (1 - l3.l_discount) AS volume - FROM ( - SELECT l2.l_shipdate, l2.l_extendedprice, l2.l_discount, l2.c_nationkey, s.s_nationkey - FROM Supplier s JOIN - ( - SELECT l1.l_shipdate, l1.l_extendedprice, l1.l_discount, l1.l_suppkey, c.c_nationkey - FROM Customer c JOIN - ( - SELECT l.l_shipdate, l.l_extendedprice, l.l_discount, l.l_suppkey, o.o_custkey - FROM Orders o - JOIN LineItem l ON o.o_orderkey = l.l_orderkey AND l.l_shipdate >= '1995-01-01' - AND l.l_shipdate <= '1996-12-31' - ) l1 ON c.c_custkey = l1.o_custkey - ) l2 ON s.s_suppkey = l2.l_suppkey - ) l3 - JOIN q7_volume_shipping_tmp t - ON t.c_nationkey = l3.c_nationkey AND t.s_nationkey = l3.s_nationkey - ) shipping -GROUP BY supp_nation, cust_nation, l_year -ORDER BY supp_nation, cust_nation, l_year; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7a0ba78d/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/buffermanager/TupleInFrameListAccessor.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/buffermanager/TupleInFrameListAccessor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/buffermanager/TupleInFrameListAccessor.java index 2c9d24a..aadcb26 100644 --- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/buffermanager/TupleInFrameListAccessor.java +++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/buffermanager/TupleInFrameListAccessor.java @@ -24,8 +24,7 @@ import java.util.List; import org.apache.hyracks.api.comm.IFrameTupleAccessor; import org.apache.hyracks.api.dataflow.value.RecordDescriptor; -import org.apache.hyracks.dataflow.std.sort.util.DeletableFrameTupleAppender; -import org.apache.hyracks.dataflow.std.sort.util.IAppendDeletableFrameTupleAccessor; +import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor; import org.apache.hyracks.dataflow.std.structures.TuplePointer; /** @@ -33,11 +32,11 @@ import org.apache.hyracks.dataflow.std.structures.TuplePointer; */ public class TupleInFrameListAccessor extends AbstractTuplePointerAccessor { - private IAppendDeletableFrameTupleAccessor bufferAccessor; + private IFrameTupleAccessor bufferAccessor; private List<ByteBuffer> bufferFrames; public TupleInFrameListAccessor(RecordDescriptor rd, List<ByteBuffer> bufferFrames) { - bufferAccessor = new DeletableFrameTupleAppender(rd); + bufferAccessor = new FrameTupleAccessor(rd); this.bufferFrames = bufferFrames; }