Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2217

deep_equal throws ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.4
    • 0.9.4.2
    • FUN - Functions

    Description

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

      DDL:

      DROP DATAVERSE DeepEqualDataverse IF EXISTS;
      CREATE DATAVERSE DeepEqualDataverse;
      
      USE DeepEqualDataverse;
      CREATE TYPE EqType as {
          a: int
      };
      
      CREATE DATASET Eq(EqType)
      PRIMARY KEY a;
      

      DML:

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

      Query:

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

      Output:

      Error ClassCastException: org.apache.asterix.om.pointables.AFlatValuePointable cannot be cast to org.apache.asterix.om.pointables.ARecordVisitablePointable
      

      Attachments

        Activity

          People

            alsuliman Ali Alsuliman
            wyk Wail Y. Alkowaileet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: