Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2611

Input parameters and current functions in input tables of TMUDFs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-incubating
    • 2.2.0
    • sql-cmp
    • None
    • any

    Description

      When the input of a table-mapping UDF (TMUDF) contains a parameter or a function that should be evaluated only once, such as current_timestamp, we do not always set up the correct data flow. This is visible, for example, when using a parallel UDF query that has "current_timestamp" as an input:

      control query shape esp_exchange(cut,4);
      select * from udf(echo(table(select current_timestamp from tsrc <<+cardinality 1e9>>)));
      execute s;
      

      This query could return different timestamps, which is wrong, all rows should have the same timestamp. A similar issue could happen with input parameters.

      Attachments

        1. EchoUdf.cpp
          1 kB
          Hans Zeller

        Issue Links

          Activity

            People

              hzeller Hans Zeller
              hzeller Hans Zeller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: