asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ildar Absalyamov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ASTERIXDB-1215) Get-record-fields() incorrectly determines type of complex open field
Date Thu, 03 Dec 2015 08:18:11 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ildar Absalyamov updated ASTERIXDB-1215:
----------------------------------------
    Description: 
If the record has open complex collection (olist, ulist, nested record) field get-record-fields()
function cannot correctly infer the type of collection.
{noformat}
drop dataverse test if exists
create dataverse test
use dataverse test

create type testType as open{
  "id": int64
}
create dataset testDS(testType) primary key id;
insert into dataset testDS({"id": 1, "heterogeneous_list": ["test", "0"] })
for $r in dataset testDS
return get-record-fields($r)
{noformat}
This happen because the type is never properly set at https://github.com/apache/incubator-asterixdb/blob/master/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java#L159

  was:
If the record has open complex collection (olist, ulist, nested record) field get-record-fields()
function cannot correctly infer the type of collection.
{noformat}
drop dataverse test if exists
create dataverse test
use dataverse test

create type testType as open{
  "id": int64
}
create dataset testDS(testType) primary key id;
insert into dataset testDS({"id": 1, "heterogeneous_list": ["test", "0"] })
for $r in dataset testDS
return get-record-fields($r)
{noformat}
This happen because the type is never set at https://github.com/apache/incubator-asterixdb/blob/master/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java#L159


> Get-record-fields() incorrectly determines type of complex open field
> ---------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1215
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1215
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Functions - AQL
>            Reporter: Ildar Absalyamov
>            Assignee: Preston Carman
>            Priority: Minor
>
> If the record has open complex collection (olist, ulist, nested record) field get-record-fields()
function cannot correctly infer the type of collection.
> {noformat}
> drop dataverse test if exists
> create dataverse test
> use dataverse test
> create type testType as open{
>   "id": int64
> }
> create dataset testDS(testType) primary key id;
> insert into dataset testDS({"id": 1, "heterogeneous_list": ["test", "0"] })
> for $r in dataset testDS
> return get-record-fields($r)
> {noformat}
> This happen because the type is never properly set at https://github.com/apache/incubator-asterixdb/blob/master/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java#L159



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message