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

Compilation error with valid query

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • COMP - Compiler

    Description

      The following query fails compilation

      SELECT COUNT(id) AS matches
      FROM collection1 AS d
      WHERE d.`f1` = 'f1'
        AND (ARRAY_SUM((
            SELECT VALUE i.`cnt`
            FROM d.`x1` AS i
            WHERE i.`date` BETWEEN "01-01-2024" AND "02-02-2024"
              AND i.`item` IN ['1234', '5678'] )) >= 1
          OR ARRAY_SUM((
            SELECT VALUE i.`cnt`
            FROM d.`x2` AS i
            WHERE i.`date` BETWEEN "01-01-2024" AND "02-02-2024"
              AND i.`item` IN ['1234', '5678'] )) >= 1
          OR (ANY e IN d.x3 SATISFIES e.item IN ['i1', 'i2', 'i3']
            AND e.su.`x4` >= 1 END));

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            peeyushgupta1 Peeyush Gupta
            peeyushgupta1 Peeyush Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment