[
https://issues.apache.org/jira/browse/ASTERIXDB-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16845066#comment-16845066
]
ASF subversion and git services commented on ASTERIXDB-2288:
------------------------------------------------------------
Commit 249c95599c6ca1a61de81ec0a80374eed0cd0784 in asterixdb's branch
refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=249c955 ]
[ASTERIXDB-2288][COMP] Fix field access with UNION
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
For UNION, if there is an assign operator above UNION, the optimizer
will move the assign operator under UNION into both branches. If
the assign operator has field access by index, the index is based on
the output record of the union operator which could be different from
the field index in left and right branches. The fix is to map the
index to the correct index of the input operator where the assign
is copied to.
Change-Id: I4d65374aca6959fd5e70279fac8f7f0a6c7c64c5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3400
Contrib: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Dmitry Lychagin <[email protected]>
> Problems in SQL++ compilation when types "open up"
> --------------------------------------------------
>
> Key: ASTERIXDB-2288
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2288
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Affects Versions: 0.9.4
> Reporter: Michael J. Carey
> Assignee: Ali Alsuliman
> Priority: Major
> Labels: triaged
> Fix For: 0.9.4.2
>
>
> USE TinySocial;
> -- This works based on the TinySocial tutorial schema
> SELECT VALUE a FROM (SELECT VALUE c FROM ChirpUsers c UNION ALL SELECT VALUE
> g FROM GleambookUsers g) AS a;
> -- This doesn't work properly (field accesses broken)
> SELECT name FROM (SELECT VALUE c FROM ChirpUsers c UNION ALL SELECT VALUE g
> FROM GleambookUsers g) AS a;
> -- This one is weird (returns some empty records)
> SELECT alias FROM (SELECT VALUE c FROM ChirpUsers c UNION ALL SELECT VALUE g
> FROM GleambookUsers g) AS a;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)