asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [3/3] incubator-asterixdb git commit: Add single-query-wide unique id generator.
Date Mon, 22 Feb 2016 08:13:46 GMT
Add single-query-wide unique id generator.

Change-Id: I302f1547c5668250cf4801dbe26ae2aa6f455aa6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/647
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/084e4802
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/084e4802
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/084e4802

Branch: refs/heads/master
Commit: 084e4802caeac860e01d736be6a415f86cea919d
Parents: 58ffd47
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Sun Feb 21 23:20:14 2016 -0800
Committer: Yingyi Bu <buyingyi@gmail.com>
Committed: Mon Feb 22 00:08:52 2016 -0800

----------------------------------------------------------------------
 .../queries/binary/query_id/query_id.1.ddl.aql  |   46 +
 .../binary/query_id/query_id.2.update.aql       |   24 +
 .../binary/query_id/query_id.3.query.aql        |   26 +
 .../results/binary/query_id/query_id.1.adm      | 6005 ++++++++++++++++++
 .../src/test/resources/runtimets/testsuite.xml  |    5 +
 .../om/functions/AsterixBuiltinFunctions.java   |   11 +-
 .../functions/CreateQueryUIDDescriptor.java     |   92 +
 .../runtime/formats/NonTaggedDataFormat.java    |    2 +
 8 files changed, 6208 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/084e4802/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.1.ddl.aql
b/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.1.ddl.aql
new file mode 100644
index 0000000..206af05
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.1.ddl.aql
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int64,
+  l_partkey: int64,
+  l_suppkey: int64,
+  l_linenumber: int64,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_returnflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/084e4802/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.2.update.aql
b/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.2.update.aql
new file mode 100644
index 0000000..3254551
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.2.update.aql
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+use dataverse tpch;
+
+load dataset LineItem
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"))
pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/084e4802/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.3.query.aql
b/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.3.query.aql
new file mode 100644
index 0000000..89e5b8e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/binary/query_id/query_id.3.query.aql
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+use dataverse tpch;
+
+for $l in dataset('LineItem')
+let $id := create-query-uid()
+distinct by $id
+order by $id
+return print-binary($id, "hex");


Mime
View raw message