Clone
Ali Alsuliman <ali.al.solaiman@gmail.com>
committed
on 30 Nov 18
[NO ISSUE][IDX][COMP] Creating an open index on non-declared fields
- user model changes: no
- storage format changes: no
- interface change… Show more
[NO ISSUE][IDX][COMP] Creating an open index on non-declared fields

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

This patch is to fix creating an open index on non-declared fields.

When compiling the CREATE INDEX DDL statement, it is assumed

that all nested record fields will be of type ARecordType. However, for

open indexes, any nested non-declared record field will be optional.

In this case, the type will be AUnion(ARecordType) which results

in type casting exceptions for certain situations. An example is:

CREATE INDEX idx ON ds(a.b.c: int, a.b.d: string). Both a and b could

have the type AUnion(ARecordType). This patch takes care of such cases.

Change-Id: I9f09ed73f27090c5be7b1a665f4591b29a8cda12

Reviewed-on: https://asterix-gerrit.ics.uci.edu/3045

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Till Westmann <tillw@apache.org>

Show less