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

TMUDF returns wrong results with small numeric inputs

    XMLWordPrintableJSON

Details

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

    Description

      I got an incorrect result with this query:

      >>select * from udf(echo(table(select * from (values (1), (22), (3), (4)) t(x))));
      
      X     
      ------
      
           1
        -234
           3
         772
      
      --- 4 row(s) selected.
      >>
      

      Note that -234 if FF16 (and 16 is hex for 22) and that 772 is 304, so it's a junk byte followed by the true values 22 and 4 that is returned.

      Attachments

        1. EchoUdf.cpp
          1 kB
          Hans Zeller

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: