Uploaded image for project: 'Hivemall'
  1. Hivemall
  2. HIVEMALL-72

Fix rescale UDF behavior to return range [0.0,1.0]

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Labels:

      Description

      rescale(value, min, max) should return min value when value is less than min.
      rescale(value, min, max) should return max value when value is greater than min.

      o Current behavior

      select rescale(4.2,1.0,3.0),rescale(-0.3, 1.0, 3.0);
      

      > 1.5999999 -0.65

      o Expected behavior

      select rescale(4.2,1.0,3.0),rescale(-0.3, 1.0, 3.0);
      

      > 1.0 3.0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                myui Makoto Yui
                Reporter:
                myui Makoto Yui
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: