Move BAD from AQL to SQL++
Change-Id: I563bf7b91b280eb65fbbbca0e95e8968f05ea591
diff --git a/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-create.aql b/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-create.sqlpp
similarity index 73%
rename from asterix-bad/src/test/resources/optimizerts/queries/channel/channel-create.aql
rename to asterix-bad/src/test/resources/optimizerts/queries/channel/channel-create.sqlpp
index a5d4167..24d73e2 100644
--- a/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-create.aql
+++ b/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-create.sqlpp
@@ -24,15 +24,14 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
-
+use channels;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,14 +40,13 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
-write output to nc1:"rttest/channel-create.adm";
+write output to nc1:"rttest/channel-create.sqlpp";
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
diff --git a/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql b/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-subscribe.sqlpp
similarity index 74%
rename from asterix-bad/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
rename to asterix-bad/src/test/resources/optimizerts/queries/channel/channel-subscribe.sqlpp
index cbccbde..4a5cbbc 100644
--- a/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
+++ b/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-subscribe.sqlpp
@@ -24,15 +24,14 @@
drop dataverse channels2 if exists;
create dataverse channels2;
-use dataverse channels2;
-
+use channels2;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,18 +40,17 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
-write output to nc1:"rttest/channel-subscribe.adm";
+write output to nc1:"rttest/channel-subscribe.sqlpp";
create broker brokerA at "http://www.hello.com";
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
\ No newline at end of file
+subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
diff --git a/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql b/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.sqlpp
similarity index 74%
rename from asterix-bad/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
rename to asterix-bad/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.sqlpp
index 039b554..508eaa2 100644
--- a/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
+++ b/asterix-bad/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.sqlpp
@@ -24,15 +24,14 @@
drop dataverse channels3 if exists;
create dataverse channels3;
-use dataverse channels3;
-
+use channels3;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,16 +40,15 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
-write output to nc1:"rttest/channel-unsubscribe.adm";
+write output to nc1:"rttest/channel-unsubscribe.sqlpp";
-unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;
\ No newline at end of file
+unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;
diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
index b642fed..4c0ff87 100644
--- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
+++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
@@ -1,23 +1,23 @@
-- NOTIFY_BROKERS |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- PRE_CLUSTERED_GROUP_BY[$$53, $$1] |PARTITIONED|
+ -- PRE_CLUSTERED_GROUP_BY[$$52, $$0] |PARTITIONED|
{
-- AGGREGATE |LOCAL|
-- NESTED_TUPLE_SOURCE |LOCAL|
}
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$53(ASC), $$1(ASC)] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$53, $$1] |PARTITIONED|
+ -- STABLE_SORT [$$52(ASC), $$0(ASC)] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$52, $$0] |PARTITIONED|
-- PRE_SORTED_DISTINCT_BY |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$40(ASC)] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$40] |PARTITIONED|
+ -- STABLE_SORT [$$37(ASC)] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$37] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- COMMIT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- INSERT_DELETE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$35] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
@@ -31,8 +31,8 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$45, $$47][$$41, $$42] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$45, $$47] |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
@@ -40,7 +40,7 @@
-- BROADCAST_EXCHANGE |PARTITIONED|
-- ASSIGN |UNPARTITIONED|
-- EMPTY_TUPLE_SOURCE |UNPARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$41, $$42] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
@@ -54,4 +54,4 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- DATASOURCE_SCAN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
index 68d1c86..42544d9 100644
--- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
+++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
@@ -1,23 +1,23 @@
-- NOTIFY_BROKERS |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- PRE_CLUSTERED_GROUP_BY[$$53, $$1] |PARTITIONED|
+ -- PRE_CLUSTERED_GROUP_BY[$$52, $$0] |PARTITIONED|
{
-- AGGREGATE |LOCAL|
-- NESTED_TUPLE_SOURCE |LOCAL|
}
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$53(ASC), $$1(ASC)] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$53, $$1] |PARTITIONED|
+ -- STABLE_SORT [$$52(ASC), $$0(ASC)] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$52, $$0] |PARTITIONED|
-- PRE_SORTED_DISTINCT_BY |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$40(ASC)] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$40] |PARTITIONED|
+ -- STABLE_SORT [$$37(ASC)] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$37] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- COMMIT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- INSERT_DELETE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$35] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
@@ -31,8 +31,8 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$45, $$47][$$41, $$42] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$45, $$47] |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
@@ -40,7 +40,7 @@
-- BROADCAST_EXCHANGE |PARTITIONED|
-- ASSIGN |UNPARTITIONED|
-- EMPTY_TUPLE_SOURCE |UNPARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$41, $$42] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
@@ -62,7 +62,7 @@
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- INSERT_DELETE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$8] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$4] |PARTITIONED|
-- ASSIGN |UNPARTITIONED|
-- STREAM_PROJECT |UNPARTITIONED|
-- ASSIGN |UNPARTITIONED|
diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
index 79aaa8c..843205a 100644
--- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
+++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
@@ -1,23 +1,23 @@
-- NOTIFY_BROKERS |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- PRE_CLUSTERED_GROUP_BY[$$53, $$1] |PARTITIONED|
+ -- PRE_CLUSTERED_GROUP_BY[$$52, $$0] |PARTITIONED|
{
-- AGGREGATE |LOCAL|
-- NESTED_TUPLE_SOURCE |LOCAL|
}
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$53(ASC), $$1(ASC)] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$53, $$1] |PARTITIONED|
+ -- STABLE_SORT [$$52(ASC), $$0(ASC)] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$52, $$0] |PARTITIONED|
-- PRE_SORTED_DISTINCT_BY |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- STABLE_SORT [$$40(ASC)] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$40] |PARTITIONED|
+ -- STABLE_SORT [$$37(ASC)] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$37] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- COMMIT |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- INSERT_DELETE |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$35] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
@@ -31,8 +31,8 @@
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
- -- HYBRID_HASH_JOIN [$$45, $$47][$$41, $$42] |PARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$45, $$47] |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
@@ -40,7 +40,7 @@
-- BROADCAST_EXCHANGE |PARTITIONED|
-- ASSIGN |UNPARTITIONED|
-- EMPTY_TUPLE_SOURCE |UNPARTITIONED|
- -- HASH_PARTITION_EXCHANGE [$$41, $$42] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED|
-- STREAM_PROJECT |PARTITIONED|
-- ASSIGN |PARTITIONED|
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.sqlpp
similarity index 76%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.sqlpp
index 97add37..5e1a742 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.sqlpp
@@ -25,14 +25,14 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,12 +41,11 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
deleted file mode 100644
index c2c3c34..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
+++ /dev/null
@@ -1,26 +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.
- */
-use dataverse channels;
-
-for $result in dataset Metadata.Channel where $result.ChannelName = "nearbyTweetChannel"
-for $x in dataset Metadata.Dataset
-where $x.DatasetName = $result.SubscriptionsDatasetName
-or $x.DatasetName = $result.ResultsDatasetName
-order by $x.DatasetName
-return $x;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.sqlpp
similarity index 75%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.sqlpp
index 12bc053..c9ac4c8 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.sqlpp
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-/*
-* Description : Room Occupants Test
-* Expected Res : Success
-* Date : Sep 2016
-* Author : Steven Jacobs
-*/
-600000
\ No newline at end of file
+use channels;
+
+select value x
+from Metadata.`Channel` result, Metadata.`Dataset` x
+where result.ChannelName = "nearbyTweetChannel"
+and (x.DatasetName = result.SubscriptionsDatasetName
+or x.DatasetName = result.ResultsDatasetName)
+order by x.DatasetName;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.sqlpp
similarity index 75%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.sqlpp
index e96db01..69c3e3e 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.sqlpp
@@ -25,14 +25,14 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,12 +41,11 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
deleted file mode 100644
index e96ee38..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,23 +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.
- */
-use dataverse channels;
-
-for $result in dataset Metadata.Channel
-order by $result.ChannelName
-return $result;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.sqlpp
similarity index 90%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.sqlpp
index 3d3c206..0728be0 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.sqlpp
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-drop channel nearbyTweetChannel2;
\ No newline at end of file
+select value x
+from Metadata.`Channel` x
+order by x.ChannelName;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.sqlpp
similarity index 78%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.sqlpp
index 6234721..cd6db81 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.sqlpp
@@ -25,14 +25,14 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,16 +41,15 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
+create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.sqlpp
similarity index 96%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.sqlpp
index 3d3c206..0eb7fe5 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.sqlpp
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-drop channel nearbyTweetChannel2;
\ No newline at end of file
+drop channel nearbyTweetChannel2;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
deleted file mode 100644
index 2944387..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
+++ /dev/null
@@ -1,26 +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.
- */
-use dataverse channels;
-
-for $result in dataset Metadata.Channel
-for $x in dataset Metadata.Dataset
-where $x.DatasetName = $result.SubscriptionsDatasetName
-or $x.DatasetName = $result.ResultsDatasetName
-order by $x.DatasetName
-return $x;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.sqlpp
similarity index 79%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.sqlpp
index 12bc053..cde68a7 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.sqlpp
@@ -16,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-/*
-* Description : Room Occupants Test
-* Expected Res : Success
-* Date : Sep 2016
-* Author : Steven Jacobs
-*/
-600000
\ No newline at end of file
+use channels;
+
+select value x
+from Metadata.`Channel` result, Metadata.`Dataset` x
+where x.DatasetName = result.SubscriptionsDatasetName
+or x.DatasetName = result.ResultsDatasetName
+order by x.DatasetName
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
deleted file mode 100644
index 6234721..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
+++ /dev/null
@@ -1,56 +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.
- */
-/*
-* Description : Drop Channel Test. Check Metadata
-* Expected Res : Success
-* Date : March 2015
-* Author : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
- tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
- countA: int32,
- countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp
similarity index 78%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp
index 6234721..cd6db81 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp
@@ -25,14 +25,14 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,16 +41,15 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
+create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql
deleted file mode 100644
index 3d3c206..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql
+++ /dev/null
@@ -1,21 +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.
- */
-use dataverse channels;
-
-drop channel nearbyTweetChannel2;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp
similarity index 96%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp
index 3d3c206..0eb7fe5 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-drop channel nearbyTweetChannel2;
\ No newline at end of file
+drop channel nearbyTweetChannel2;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
deleted file mode 100644
index e96ee38..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,23 +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.
- */
-use dataverse channels;
-
-for $result in dataset Metadata.Channel
-order by $result.ChannelName
-return $result;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp
similarity index 90%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp
index 3d3c206..0728be0 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-drop channel nearbyTweetChannel2;
\ No newline at end of file
+select value x
+from Metadata.`Channel` x
+order by x.ChannelName;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp
similarity index 83%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp
index 7ed987e..9febd43 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp
@@ -25,7 +25,7 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type userLocation as {
userId: int,
@@ -38,7 +38,7 @@
create type roomSecurity as {
roomNumber: int,
securityGuardName: string,
- securityGuardNumber: string
+ securityGuardNumber: string
}
create dataset watchedUsers(watchedUser)
@@ -47,13 +47,13 @@
create dataset roomSecurityAssignments(roomSecurity)
primary key roomNumber;
-upsert into dataset roomSecurityAssignments([
-{"roomNumber":123, "securityGuardName":"Mike", "securityGuardNumber":"555-4815"},
-{"roomNumber":222, "securityGuardName":"Steven", "securityGuardNumber":"555-1623"},
-{"roomNumber":350, "securityGuardName":"Vassilis", "securityGuardNumber":"555-1234"}]
+upsert into roomSecurityAssignments([
+{"roomNumber":123, "securityGuardName":"Mike", "securityGuardNumber":"555_4815"},
+{"roomNumber":222, "securityGuardName":"Steven", "securityGuardNumber":"555_1623"},
+{"roomNumber":350, "securityGuardName":"Vassilis", "securityGuardNumber":"555_1234"}]
);
-upsert into dataset watchedUsers([
+upsert into watchedUsers([
{"userId":1, "name":"suspectNumber1"}]
);
@@ -61,14 +61,14 @@
create dataset UserLocations(userLocation)
primary key userId;
-create function RoomOccupants($room) {
- for $location in dataset UserLocations
- where $location.roomNumber = $room
- return $location.userId
+create function RoomOccupants(room) {
+ (select location.userId
+ from UserLocations location
+ where location.roomNumber = room)
};
create broker brokerA at "http://www.notifyA.com";
create broker brokerB at "http://www.notifyB.com";
-create repetitive channel roomRecords using RoomOccupants@1 period duration("PT5S");
\ No newline at end of file
+create repetitive channel roomRecords using RoomOccupants@1 period duration("PT5S");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp
similarity index 96%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp
index e253265..3e2d5c0 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp
@@ -24,6 +24,6 @@
*/
-use dataverse channels;
+use channels;
-subscribe to roomRecords (123) on brokerA;
\ No newline at end of file
+subscribe to roomRecords (123) on brokerA;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql
deleted file mode 100644
index e564c35..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql
+++ /dev/null
@@ -1,33 +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.
- */
-/*
-* Description : Room Occupants Test
-* Expected Res : Success
-* Date : Sep 2016
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-
-from $test in dataset roomRecordsSubscriptions
-order by $test.BrokerName
-select {
-"broker":$test.BrokerName,
-"parameter":$test.param0
-}
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp
similarity index 93%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp
index 12bc053..2e00f6a 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp
@@ -22,4 +22,8 @@
* Date : Sep 2016
* Author : Steven Jacobs
*/
-600000
\ No newline at end of file
+
+
+use channels;
+
+subscribe to roomRecords (350) on brokerB;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp
similarity index 89%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp
index 59a8678..de8d3e8 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp
@@ -23,8 +23,8 @@
* Author : Steven Jacobs
*/
+use channels;
-use dataverse channels;
-
-subscribe to roomRecords (123) on brokerA;
-subscribe to roomRecords (350) on brokerB;
\ No newline at end of file
+select test.BrokerName, test.param0
+from roomRecordsSubscriptions test
+order by test.BrokerName
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp
similarity index 94%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp
index 66d6a7d..2499ac7 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp
@@ -24,11 +24,11 @@
*/
-use dataverse channels;
+use channels;
-upsert into dataset UserLocations([
+upsert into UserLocations([
{"userId":1, "roomNumber":123},
{"userId":2, "roomNumber":222},
{"userId":3, "roomNumber":350}]
-);
\ No newline at end of file
+);
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.sqlpp
similarity index 99%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.sqlpp
index e90c028..b7bb951 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.sqlpp
@@ -22,4 +22,4 @@
* Date : Sep 2016
* Author : Steven Jacobs
*/
-5000
\ No newline at end of file
+5000
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql
deleted file mode 100644
index 45ed2d6..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql
+++ /dev/null
@@ -1,30 +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.
- */
-/*
-* Description : Room Occupants Test
-* Expected Res : Success
-* Date : Sep 2016
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-
-from $result in dataset roomRecordsResults
-order by $result.result
-select $result.result;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.update.sqlpp
similarity index 94%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.update.sqlpp
index 7875ec0..eb7ee2e 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.update.sqlpp
@@ -23,10 +23,10 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
+use channels;
-upsert into dataset UserLocations([
+upsert into UserLocations([
{"userId":1, "roomNumber":222},
{"userId":2, "roomNumber":222},
{"userId":3, "roomNumber":222}]
-);
\ No newline at end of file
+);
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp
similarity index 89%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp
index 12bc053..1f9851f 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp
@@ -22,4 +22,9 @@
* Date : Sep 2016
* Author : Steven Jacobs
*/
-600000
\ No newline at end of file
+
+use channels;
+
+select result.result.userId
+from roomRecordsResults result
+order by result.result.userId
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp
similarity index 77%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp
index 652fb6a..52942ba 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp
@@ -25,14 +25,14 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type TweetMessageTypeuuid as closed {
tweetid: uuid,
- sender-location: point,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
+ sender_location: point,
+ send_time: datetime,
+ referred_topics: {{ string }},
+ message_text: string,
countA: int32,
countB: int32
}
@@ -41,14 +41,13 @@
create dataset TweetMessageuuids(TweetMessageTypeuuid)
primary key tweetid autogenerated;
-create function NearbyTweetsContainingText($location, $text) {
- for $tweet in dataset TweetMessageuuids
- let $circle := create-circle($location,30.0)
- where contains($tweet.message-text,$text)
- and spatial-intersect($tweet.sender-location, $location)
- return $tweet.message-text
+create function NearbyTweetsContainingText(place, text) {
+ (select m.message_text
+ from TweetMessageuuids m
+ where contains(m.message_text,text)
+ and spatial_intersect(m.sender_location, place))
};
create broker brokerA at "http://www.notifyA.com";
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp
similarity index 96%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp
index 2af20cc..3917107 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
\ No newline at end of file
+subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp
similarity index 96%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp
index 4f8f21e..8b813e6 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
subscribe to nearbyTweetChannel (point("20.0, 20.0"), "Long") on brokerA;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp
similarity index 96%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp
index 71c3e14..c6cda12 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper") on brokerA;
\ No newline at end of file
+subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper") on brokerA;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql
deleted file mode 100644
index 22bf97c..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql
+++ /dev/null
@@ -1,23 +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.
- */
-use dataverse channels;
-
-for $test in dataset nearbyTweetChannelSubscriptions
-order by $test.param1
-return $test.param1;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp
similarity index 89%
copy from asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
copy to asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp
index 3d3c206..ef6a39c 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-use dataverse channels;
+use channels;
-drop channel nearbyTweetChannel2;
\ No newline at end of file
+select value param1
+from nearbyTweetChannelSubscriptions
+order by param1
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp
similarity index 97%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp
index e8f5d56..8b0b05c 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp
@@ -25,7 +25,7 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type userLocation as {
userId: int,
@@ -43,4 +43,4 @@
create broker brokerA at "http://www.notifyA.com";
-create repetitive channel roomRecords using RoomOccupants@1 period duration("PT1S");
\ No newline at end of file
+create repetitive channel roomRecords using RoomOccupants@1 period duration("PT1S");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp
similarity index 97%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp
index e253265..3e2d5c0 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp
@@ -24,6 +24,6 @@
*/
-use dataverse channels;
+use channels;
-subscribe to roomRecords (123) on brokerA;
\ No newline at end of file
+subscribe to roomRecords (123) on brokerA;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp
similarity index 94%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp
index 66d6a7d..2499ac7 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp
@@ -24,11 +24,11 @@
*/
-use dataverse channels;
+use channels;
-upsert into dataset UserLocations([
+upsert into UserLocations([
{"userId":1, "roomNumber":123},
{"userId":2, "roomNumber":222},
{"userId":3, "roomNumber":350}]
-);
\ No newline at end of file
+);
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp
similarity index 99%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp
index 12bc053..270326b 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp
@@ -22,4 +22,4 @@
* Date : Sep 2016
* Author : Steven Jacobs
*/
-600000
\ No newline at end of file
+600000
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp
similarity index 97%
rename from asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql
rename to asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp
index 55e044b..8db3fde 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp
@@ -23,8 +23,8 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
+use channels;
count (from $result in dataset roomRecordsResults
order by $result.result
-select $result.result) > 599;
\ No newline at end of file
+select $result.result) > 599;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.sqlpp
similarity index 88%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.sqlpp
index 712ad54..face703 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.sqlpp
@@ -25,7 +25,7 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type myLocation as {
timeStamp: datetime,
@@ -36,10 +36,10 @@
create dataset UserLocations(myLocation)
primary key timeStamp;
-insert into dataset UserLocations([
- {"timeStamp":current-datetime(), "roomNumber":222}]
+insert into UserLocations([
+ {"timeStamp":current_datetime(), "roomNumber":222}]
);
create procedure deleteAll() {
-delete $i from dataset UserLocations
-};
\ No newline at end of file
+delete from UserLocations
+};
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql
deleted file mode 100644
index 16013d3..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql
+++ /dev/null
@@ -1,28 +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.
- */
-/*
-* Description : Simple Delete Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-count(for $i in dataset UserLocations
-return $i);
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.sqlpp
similarity index 92%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.sqlpp
index c02ee67..c3a42ea 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-execute deleteAll();
\ No newline at end of file
+use channels;
+select value count(location) from UserLocations location;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.sqlpp
similarity index 97%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.sqlpp
index c02ee67..dd9e350 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-execute deleteAll();
\ No newline at end of file
+use channels;
+execute deleteAll();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.4.query.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.4.query.aql
deleted file mode 100644
index 16013d3..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.4.query.aql
+++ /dev/null
@@ -1,28 +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.
- */
-/*
-* Description : Simple Delete Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-count(for $i in dataset UserLocations
-return $i);
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.4.query.sqlpp
similarity index 92%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.4.query.sqlpp
index c02ee67..c3a42ea 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.4.query.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-execute deleteAll();
\ No newline at end of file
+use channels;
+select value count(location) from UserLocations location;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.1.ddl.sqlpp
similarity index 88%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.1.ddl.sqlpp
index b3eebc0..783aacb 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.1.ddl.sqlpp
@@ -25,7 +25,7 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type myLocation as {
timeStamp: datetime,
@@ -36,8 +36,8 @@
create dataset UserLocations(myLocation)
primary key timeStamp;
-create procedure findMe() {
- insert into dataset UserLocations([
- {"timeStamp":current-datetime(), "roomNumber":222}]
+create procedure addMe() {
+ insert into UserLocations([
+ {"timeStamp":current_datetime(), "roomNumber":222}]
)
};
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.sqlpp
similarity index 96%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.sqlpp
index 361f288..8610395 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.sqlpp
@@ -23,4 +23,5 @@
* Author : Steven Jacobs
*/
-11000
\ No newline at end of file
+use channels;
+execute addMe();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.aql
deleted file mode 100644
index 4f9a164..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.aql
+++ /dev/null
@@ -1,27 +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.
- */
-/*
-* Description : Simple Insert Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-execute findMe();
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.sqlpp
similarity index 96%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.sqlpp
index 361f288..8610395 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.sqlpp
@@ -23,4 +23,5 @@
* Author : Steven Jacobs
*/
-11000
\ No newline at end of file
+use channels;
+execute addMe();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.aql
deleted file mode 100644
index 4f9a164..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.aql
+++ /dev/null
@@ -1,27 +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.
- */
-/*
-* Description : Simple Insert Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-execute findMe();
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.sqlpp
similarity index 96%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.sqlpp
index 361f288..8610395 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.sqlpp
@@ -23,4 +23,5 @@
* Author : Steven Jacobs
*/
-11000
\ No newline at end of file
+use channels;
+execute addMe();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.sqlpp
similarity index 94%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.sqlpp
index 9128d0f..5ed56cf 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-drop procedure findMe@0;
\ No newline at end of file
+use channels;
+drop procedure addMe@0;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.6.query.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.6.query.sqlpp
similarity index 92%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.6.query.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.6.query.sqlpp
index 5bf00cf..2094a77 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.6.query.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.6.query.sqlpp
@@ -23,6 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-count(for $i in dataset UserLocations
-return $i);
\ No newline at end of file
+use channels;
+select value count(location) from UserLocations location;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.1.ddl.sqlpp
similarity index 91%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.1.ddl.sqlpp
index 8a23b38..8cdfc6a 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.1.ddl.sqlpp
@@ -25,7 +25,7 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type myLocation as {
timeStamp: datetime,
@@ -37,7 +37,6 @@
primary key timeStamp;
create procedure findMe() {
-for $i in dataset UserLocations
-order by $i.timeStamp
-return $i.roomNumber
-};
\ No newline at end of file
+select roomNumber from UserLocations
+order by timeStamp;
+};
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.2.update.aql
deleted file mode 100644
index d7eb3eb..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.2.update.aql
+++ /dev/null
@@ -1,30 +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.
- */
-/*
-* Description : Simple Query Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-
-insert into dataset UserLocations([
- {"timeStamp":current-datetime(), "roomNumber":222}]
-)
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.2.update.sqlpp
similarity index 88%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.2.update.sqlpp
index 3af0eeb..28370e9 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.2.update.sqlpp
@@ -23,7 +23,8 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-insert into dataset UserLocations([
- {"timeStamp":current-datetime(), "roomNumber":225}]
-)
\ No newline at end of file
+use channels;
+
+insert into UserLocations([
+ {"timeStamp":current_datetime(), "roomNumber":222}]
+)
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.3.update.sqlpp
similarity index 97%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.3.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.3.update.sqlpp
index d21ef6f..5d02928 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.3.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.3.update.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-execute findMe();
\ No newline at end of file
+use channels;
+execute findMe();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.sqlpp
similarity index 88%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.sqlpp
index 3af0eeb..ef3184b 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.4.update.sqlpp
@@ -23,7 +23,7 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-insert into dataset UserLocations([
- {"timeStamp":current-datetime(), "roomNumber":225}]
-)
\ No newline at end of file
+use channels;
+insert into UserLocations([
+ {"timeStamp":current_datetime(), "roomNumber":225}]
+)
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.5.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.5.update.sqlpp
similarity index 97%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.5.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.5.update.sqlpp
index ce66457..fb92f66 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.5.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure/query_procedure.5.update.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-execute findMe();
\ No newline at end of file
+use channels;
+execute findMe();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.1.ddl.sqlpp
similarity index 88%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.1.ddl.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.1.ddl.sqlpp
index a940ace..b89d997 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.1.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.1.ddl.sqlpp
@@ -25,7 +25,7 @@
drop dataverse channels if exists;
create dataverse channels;
-use dataverse channels;
+use channels;
create type myLocation as {
timeStamp: datetime,
@@ -36,8 +36,8 @@
create dataset UserLocations(myLocation)
primary key timeStamp;
-create procedure findMe() {
- insert into dataset UserLocations([
- {"timeStamp":current-datetime(), "roomNumber":222}]
+create procedure addMe() {
+ insert into UserLocations([
+ {"timeStamp":current_datetime(), "roomNumber":222}]
)
} period duration("PT5S");
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.2.update.aql
deleted file mode 100644
index 4f9a164..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.2.update.aql
+++ /dev/null
@@ -1,27 +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.
- */
-/*
-* Description : Simple Insert Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-execute findMe();
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.2.update.sqlpp
similarity index 96%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.2.update.sqlpp
index 361f288..8610395 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.2.update.sqlpp
@@ -23,4 +23,5 @@
* Author : Steven Jacobs
*/
-11000
\ No newline at end of file
+use channels;
+execute addMe();
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.sqlpp
similarity index 99%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.sqlpp
index 361f288..af1e202 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.3.sleep.sqlpp
@@ -23,4 +23,4 @@
* Author : Steven Jacobs
*/
-11000
\ No newline at end of file
+11000
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.4.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.4.ddl.aql
deleted file mode 100644
index c974aa0..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.4.ddl.aql
+++ /dev/null
@@ -1,27 +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.
- */
-/*
-* Description : Simple Insert Procedure
-* Expected Res : Success
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-drop procedure findMe@0;
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.4.ddl.sqlpp
similarity index 95%
rename from asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.aql
rename to asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.4.ddl.sqlpp
index 4f9a164..2ebf4b1 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.4.ddl.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-execute findMe();
\ No newline at end of file
+use channels;
+drop procedure addMe@0;
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.5.query.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.5.query.aql
deleted file mode 100644
index 14321a1..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.5.query.aql
+++ /dev/null
@@ -1,28 +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.
- */
-/*
-* Description : Simple Insert Procedure
-* Expected Res : 3
-* Date : Jan 2017
-* Author : Steven Jacobs
-*/
-
-use dataverse channels;
-count(for $i in dataset UserLocations
-return $i);
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.5.query.sqlpp
similarity index 92%
copy from asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.aql
copy to asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.5.query.sqlpp
index 9128d0f..d84d2dd 100644
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.5.ddl.aql
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/repetitive_insert_procedure/repetitive_insert_procedure.5.query.sqlpp
@@ -23,5 +23,5 @@
* Author : Steven Jacobs
*/
-use dataverse channels;
-drop procedure findMe@0;
\ No newline at end of file
+use channels;
+select value count(location) from UserLocations location;
diff --git a/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.1.adm b/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.1.adm
new file mode 100644
index 0000000..ce8cc0f
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.1.adm
@@ -0,0 +1,2 @@
+{ "BrokerName": "brokerA", "param0": 123 }
+{ "BrokerName": "brokerB", "param0": 350 }
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.2.adm b/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.2.adm
new file mode 100644
index 0000000..0abd600
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.2.adm
@@ -0,0 +1,2 @@
+{ "userId": 1 }
+{ "userId": 3 }
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.3.adm b/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.3.adm
deleted file mode 100644
index 8f3c264..0000000
--- a/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.3.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-{ "broker": "brokerA", "parameter": 123 }
-{ "broker": "brokerB", "parameter": 350 }
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.7.adm b/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.7.adm
deleted file mode 100644
index c396a2c..0000000
--- a/asterix-bad/src/test/resources/runtimets/results/channel/room_occupants/room_occupants.7.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-1
-3
\ No newline at end of file
diff --git a/asterix-bad/src/test/resources/runtimets/testsuite.xml b/asterix-bad/src/test/resources/runtimets/testsuite.xml
index 7fa6b5c..12d7d55 100644
--- a/asterix-bad/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-bad/src/test/resources/runtimets/testsuite.xml
@@ -19,7 +19,7 @@
<test-suite xmlns="urn:xml.testframework.asterix.apache.org"
ResultOffsetPath="results"
QueryOffsetPath="queries"
- QueryFileExtension=".aql">
+ QueryFileExtension=".sqlpp">
<test-group name="channel">
<test-case FilePath="channel">
<compilation-unit name="room_occupants">