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

Compilation error: Could not infer type for variable error for valid query

    XMLWordPrintableJSON

Details

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

    Description

      The following query fails with compilation error

       

      SELECT (
        SELECT c1.field1
        FROM collection1 AS c1
        WHERE c1.id IN c3.items
        UNION ALL
        SELECT c2.field2
        FROM collection2 c2 )
      FROM collection3 AS c3
      org.apache.asterix.common.exceptions.CompilationException: ASX1079: Compilation error: Could not infer type for variable '$$69'. (in line 2, at column 3)   
       at
      org.apache.asterix.optimizer.rules.SetClosedRecordConstructorsRule$SettingClosedRecordVisitor.visitVariableReferenceExpression(SetClosedRecordConstructorsRule.java:175) ~[classes/:?]    
      at org.apache.asterix.optimizer.rules.SetClosedRecordConstructorsRule$SettingClosedRecordVisitor.visitVariableReferenceExpression(SetClosedRecordConstructorsRule.java:80) ~[classes/:?]    

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: