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

Incorrect result when non-pure function passed as udf argument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • COMP - Compiler

    Description

      Create the following UDF

      CREATE FUNCTION check(x)  {    
         select case when x=x then 10 else 0 end
      }
      

      The following query returns 0 instead of 10

      select check(random()) 
      

      We should not inline non-pure functions in UDF body.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: