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 2019/11/02 20:37:00 UTC

[jira] [Assigned] (ASTERIXDB-2669) Hyracks exception from OBJECT_REMOVE_FIELDS subquery

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

Michael J. Carey reassigned ASTERIXDB-2669:
-------------------------------------------

    Assignee: Dmitry Lychagin

> Hyracks exception from OBJECT_REMOVE_FIELDS subquery
> ----------------------------------------------------
>
>                 Key: ASTERIXDB-2669
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2669
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: *DB - AsterixDB, FUN - Functions, RT - Runtime, SQL - Translator SQL++
>    Affects Versions: 0.9.4.1
>            Reporter: Michael J. Carey
>            Assignee: Dmitry Lychagin
>            Priority: Major
>             Fix For: 0.9.5
>
>
> This query does not work:
> SELECT VALUE t FROM (SELECT VALUE OBJECT_REMOVE_FIELDS(t, ["message"]) FROM GleambookMessages t) t WHERE t.messageId >= 3;
> It gives a semi-nasty-looking error message:
> org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression cannot be cast to org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression [ClassCastException]
> This variant of the query (with type-casting before the comparison) works:
> SELECT VALUE t FROM (SELECT VALUE OBJECT_REMOVE_FIELDS(t, ["message"]) FROM GleambookMessages t) t WHERE int(t.messageId) >= 3;
> Seems like this is a bug related to the compiler not knowing what to expect following the application of OBJECT_REMOVE_FIELDS - but it seems like it should indeed work as long as the data is okay (all numbers) at runtime.  In the event of "bad" data for the comparison at runtime, it seems like it should still work without an error, but should yield a bad comparison warning.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)