Uploaded image for project: 'SystemDS'
  1. SystemDS
  2. SYSTEMDS-589

Add Default Parameter Values to UDFs

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      This task aims to add default parameter values to UDFs for scalar and boolean types. There may already be runtime support, but the grammar does not seem to allow it.

      Example that currently works:

      script = """
      f = function(double x, int a) return (double ans) {
        ans = a * x
      }
      
      ans = f(3, 1)
      print(ans)
      """
      ml.reset()
      ml.executeScript(script)
      

      Example that would be nice:

      script = """
      f = function(double x, int a=1) return (double ans) {
        ans = a * x
      }
      
      ans = f(3)
      print(ans)
      """
      ml.reset()
      ml.executeScript(script)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dusenberrymw Mike Dusenberry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: