Wail Y. Alkowaileet created ASTERIXDB-3409:
----------------------------------------------

             Summary: Query failing compilation when run twice on columnar 
collections
                 Key: ASTERIXDB-3409
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3409
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: COMP - Compiler
    Affects Versions: 0.9.9
            Reporter: Wail Y. Alkowaileet
            Assignee: Wail Y. Alkowaileet
             Fix For: 0.9.10


{noformat}
SELECT COUNT(DISTINCT R3.id) AS count
FROM (
SELECT t.*
FROM R AS t
WHERE ((ARRAY_SUM((
        SELECT VALUE i.`count`
        FROM t.`a1` AS i)) >= 3 ))) AS R3{noformat}
{noformat}

Throws:
{noformat}
java.lang.IllegalStateException: Cannot replace ARRAY with ANY
 at 
org.apache.asterix.optimizer.rules.pushdown.schema.ObjectExpectedSchemaNode.replaceChild(ObjectExpctedSchemaNode.java:70)
{noformat}

The reason is that irreplaceable root types doesn't ignore modifications (e.g., 
adding a child)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to