Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-28352

Optimize IF(cond) within an IF(cond)

    XMLWordPrintable

Details

    • Improvement
    • Status: Merge Pending
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Code Generator
    • None

    Description

      Related to HPCC-28348.

      Sometimes because of the way nested attributes are defined it is possible that ECL simplifies to

       

      IF(cond, PROJECT(IF(cond, x, y), z); 
      

      This is much better evaluated as

      IF(cond, PROJECT(x), z);
      

      This can be optimized as the code is being generated.

      Attachments

        Activity

          People

            ghalliday Gavin Halliday
            ghalliday Gavin Halliday
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: