[
https://issues.apache.org/jira/browse/ASTERIXDB-3263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17766569#comment-17766569
]
ASF subversion and git services commented on ASTERIXDB-3263:
------------------------------------------------------------
Commit f21bb306781dfa180a35fbf5112cbe5780acaced in asterixdb's branch
refs/heads/master from Peeyush Gupta
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=f21bb30678 ]
[ASTERIXDB-3263][COMP] Incorrect data inserted when optional field in closed
type
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Update the dynamic type cast rule to correctly check type compatibility
in case of insert/upsert.
- Update the constant folding rule to allow constant fold closed records.
Change-Id: I3469da3f4f70759886fe9b98faf99eaaceff1edc
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17778
Reviewed-by: Peeyush Gupta <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
> Incorrect data inserted when optional field in closed type
> ----------------------------------------------------------
>
> Key: ASTERIXDB-3263
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3263
> Project: Apache AsterixDB
> Issue Type: Bug
> Affects Versions: 0.9.8, 0.9.9
> Reporter: Peeyush Gupta
> Assignee: Peeyush Gupta
> Priority: Major
> Labels: triaged
>
> When an Insert/Upsert is run with a list of records on a dataset with a
> closed type containing an optional field, data is inserted as al nulls.
> {code:java}
> create type testtype01 as
> closed {
> id : string,
> name : string?
> };
> create dataset testds01(testtype01) primary key id;
> insert into testds01([{"id":"1", "name":"John"}]);
> select * from testds01;
> ----
> { "testds01": { "id": null, "name": null } } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)