Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4357

Support UDFs in %declare and %default macros

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • internal-udfs
    • None

    Description

      although this syntax is legal

      %default DAYS 2
      %default TWICE_AS_LONG 2*$DAYS

      this one however is not.

      %default DATE '2014-10-01'
      DEFINE FileMask myudfs.DateFolderFileMask();
      %default FOLDER FileMask('$DATE','$DAYS')

      although I understand that preprocessor statements are likely done before DEFINE statements, and thus this is probably not trivial.

      however, it would be some really good syntactic sugar, if this was supported. the current way of using %declare with backticks forces people to write additional shell scripts, rather than use the available UDF facilities.

      thanks in advance!

      Attachments

        Activity

          People

            Unassigned Unassigned
            mxk mike kobyakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: