[
https://issues.apache.org/jira/browse/ASTERIXDB-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447615#comment-17447615
]
ASF subversion and git services commented on ASTERIXDB-2987:
------------------------------------------------------------
Commit 7fa215b7692b5b155c31fea04c1a93ca073c73f2 in asterixdb's branch
refs/heads/master from Akil Sevim
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=7fa215b ]
[ASTERIXDB-2987] Fixes the wrong order of record descriptors for spatial and
interval joins
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Fixes the wrong order of record descriptors in optimized spatial and interval
join which causes empty results when the projected fields from both sides does
not yield the same schema.
- Adds tests for the corresponding fix
Change-Id: I4f7186459a490beaac08624e7a5cbe09734a82ad
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14124
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Ian Maxon <[email protected]>
Reviewed-by: Ian Maxon <[email protected]>
> Projection issue when spatial or interval merge join are used
> -------------------------------------------------------------
>
> Key: ASTERIXDB-2987
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2987
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: RT - Runtime
> Reporter: Akil Sevim
> Priority: Major
> Attachments: interval_join_example.txt, spatial_join_example.txt
>
>
> If the projected fields do not yield the same schema for both sides of the
> join, the results return empty.
> For instance, the query below does not trigger spatial join so that we can
> project the field "name."
> {code:sql}
> SELECT r1.name
> FROM RectangleDataset r1, RectangleDataset r2
> WHERE spatial_intersect(r1.g, r2.g) = true;{code}
> However, If the spatial join is triggered to process the below query, we have
> an empty result.
> {code:sql}
> SELECT r1.name
> FROM RectangleDataset r1, RectangleDataset r2
> WHERE spatial_intersect(r1.g, r2.g);{code}
> We have the same problem for the interval merge join too. The query below
> does not trigger the optimization so that we can project the field.
> {code:sql}
> SELECT i1.name
> FROM IntervalDataset i1, IntervalDataset i2
> WHERE interval_overlapping(i1.i, i2.i);{code}
> However, If the interval merge is triggered, we have an empty result.
> {code:sql}
> SELECT i1.name
> FROM IntervalDataset i1, IntervalDataset i2
> WHERE /*+ range [date("2020-11-06"), date("2021-11-22")] */
> interval_overlapping(i1.i, i2.i);{code}
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)