You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael J. Carey (JIRA)" <ji...@apache.org> on 2017/12/23 01:11:00 UTC

[jira] [Commented] (ASTERIXDB-2211) Strange name resolution bug

    [ https://issues.apache.org/jira/browse/ASTERIXDB-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302152#comment-16302152 ] 

Michael J. Carey commented on ASTERIXDB-2211:
---------------------------------------------

I see the problem - it's the unquoted prop3 in a record constructor - but hmm, I wonder if there is some way to get a better error message if a user forgets to type the quotes around a field name in a record constructor?

> Strange name resolution bug 
> ----------------------------
>
>                 Key: ASTERIXDB-2211
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2211
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler, SQL - Translator SQL++
>            Reporter: Michael J. Carey
>            Assignee: Dmitry Lychagin
>
> From U-Washington a few months back (but still reproducible on our latest release):
> This sequence of statements produces a weird error message - "Cannot find dataset prop3 in dataverse test nor an alias with name prop3 [AlgebricksException]".  I tried to simplify it to eliminate the nested array of records, but doing that made everything work - so the problem lies therein...
> DROP DATAVERSE test IF EXISTS;
> CREATE DATAVERSE test;
> USE test;
> CREATE TYPE typeA AS {
>      propA: string
> };
> CREATE TYPE testType AS {
>    prop1: string,
>    prop2: [string],
>    prop3: [typeA]
> };
> CREATE DATASET test(testType) PRIMARY KEY prop1;
> INSERT INTO test([
> { "prop1": "hello1", "prop2": ["world"], prop3:[] },
> { "prop1": "hello2", "prop2": ["world1", "world2"], prop3: { "propA": "a" } },
> { "prop1": "hello3", "prop2": ["world1", "world2"], prop3: [{ "propA": "a" }, {"propA": "A"}]  }
> ]);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)