You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Wail Alkowaileet (JIRA)" <ji...@apache.org> on 2018/01/02 07:11:02 UTC

[jira] [Created] (ASTERIXDB-2217) deep_equal throws ClassCastException

Wail Alkowaileet created ASTERIXDB-2217:
-------------------------------------------

             Summary: deep_equal throws ClassCastException
                 Key: ASTERIXDB-2217
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2217
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: FUN - Functions
            Reporter: Wail Alkowaileet


deep_equal doesn't allocate the right pointables for open types.

DDL:
{noformat}
DROP DATAVERSE DeepEqualDataverse IF EXISTS;
CREATE DATAVERSE DeepEqualDataverse;

USE DeepEqualDataverse;
CREATE TYPE EqType as {
    a: int
};

CREATE DATASET Eq(EqType)
PRIMARY KEY a;
{noformat}

DML:
{noformat}
USE DeepEqualDataverse;
INSERT INTO Eq(
    {"a":1, "b": {"d":3, "c":1}}
)
{noformat}

Query:
{noformat}
USE DeepEqualDataverse;
SELECT *
FROM Eq as e
WHERE deep_equal({"c": 1, "d":3}, e.b)
{noformat}

Output:
{noformat}
Error ClassCastException: org.apache.asterix.om.pointables.AFlatValuePointable cannot be cast to org.apache.asterix.om.pointables.ARecordVisitablePointable
{noformat}



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