Closed GoogleCodeExporter closed 9 years ago
I think this error originates in the initial Logical Plan creation which is
(Before any optimizations):
distribute result [%0->$$8] -- |UNPARTITIONED|
project ([$$8]) -- |UNPARTITIONED|
assign [$$8] <- [function-call: asterix:open-record-constructor, Args:[AString: {subscription-id}, function-call: asterix:field-access-by-name, Args:[%0->$$4, AString: {subscription-id}], AString: {changeSet}, AInt32: {1}, AString: {execution-time}, function-call: asterix:current-datetime, Args:[], AString: {message-text}, AString: {hello}]] -- |UNPARTITIONED|
assign [$$5] <- [function-call: asterix:create-circle, Args:[%0->null, ADouble: {30.0}]] -- |UNPARTITIONED|
unnest $$4 <- function-call: asterix:dataset, Args:[AString: {TweetHistorySubscriptions}] -- |UNPARTITIONED|
empty-tuple-source -- |UNPARTITIONED|
The "create-circle" function managed to get created with a "null" :
create-circle, Args:[%0->null, ADouble: {30.0}]
Original comment by sjaco...@ucr.edu
on 8 Dec 2014 at 10:46
Simpler Producing case:
drop dataverse channels if exists;
create dataverse channels;
use dataverse channels;
create type TweetHistorySubscription as open{
subscription-id: int32
}
create dataset TweetHistorySubscriptions(TweetHistorySubscription)
primary key subscription-id;
create function NearbyTweetsContainingText($location) {
for $tweet in dataset TweetHistorySubscription
return $tweet
};
for $sub in dataset TweetHistorySubscriptions
return {
"message-text":$location
}
This seems to be an issue with scope. It looks like a function's "scope"
becomes the parent "scope" of the following statement. Since the parent "scope"
of the FLWOR has the symbol "location" it is assumed to exist.
Original comment by sjaco...@ucr.edu
on 10 Dec 2014 at 7:35
Original comment by sjaco...@ucr.edu
on 15 Dec 2014 at 7:05
Original comment by sjaco...@ucr.edu
on 16 Dec 2014 at 9:45
Original comment by sjaco...@ucr.edu
on 29 Dec 2014 at 5:43
Original issue reported on code.google.com by
sjaco...@ucr.edu
on 6 Dec 2014 at 12:49