Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4574

The uuid() function should not be treated as a constant expr.

    Details

      Description

      IMPALA-1788 introduced constant folding in the FE, but that change did not consider that the function UUID() is not a constant expression. The behavioral regression is that UUID() will only be evaluated once. Example:

      select uuid() from functional.alltypestiny;
      +--------------------------------------+
      | uuid()                               |
      +--------------------------------------+
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      | 9801bcbc-7b63-4703-bb48-221449d0d41e |
      +--------------------------------------+
      

      Similarly, there are places in the BE (scalar-fn-call.h/cc) where we should not treat UUID() as constant.

        Attachments

          Activity

            People

            • Assignee:
              alex.behm Alexander Behm
              Reporter:
              alex.behm Alexander Behm
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: