You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Steven Jacobs (JIRA)" <ji...@apache.org> on 2018/05/24 18:06:00 UTC
[jira] [Created] (ASTERIXDB-2391) IntroduceDynamicTypeCastRule
doesn't propagate through insert
Steven Jacobs created ASTERIXDB-2391:
----------------------------------------
Summary: IntroduceDynamicTypeCastRule doesn't propagate through insert
Key: ASTERIXDB-2391
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2391
Project: Apache AsterixDB
Issue Type: Improvement
Reporter: Steven Jacobs
This makes it so returning clauses refer to non-existent variables. Can be reproduced buy the following:
drop dataverse channels if exists;
create dataverse channels;
use channels;
create type sub as {
subscriptionId: uuid
};
create dataset subscriptions(sub) primary key subscriptionId;
upsert into subscriptions as record(
(let v = (select value s from subscriptions s where param0 = "HenryGale")
select value (CASE (array_count(v) > 0)
WHEN true THEN \{"subscriptionId":v[0].subscriptionId, "param0": v[0].param0,"brokerSubscriptions":v[0].brokerSubscriptions}
ELSE \{"subscriptionId":create_uuid(), "param0": "HenryGale", "brokerSubscriptions":[{"brokerSubscriptionId":create_uuid(), "brokerDataverse":"dataverse1","brokerName":"broker1"}]}
END))
) returning record.brokerSubscriptions;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)