XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 0.18.0
    • impl
    • None

    Description

      Hive UDFs support taking in the argument, while Pig always has Tuple as argument. And we do unnecessary creation of wrapping into Tuple to pass the input.

      class HelloUDF extends UDF {
        
        public Text evaluate(Text input) {
          return new Text("Hello " + input.toString());
        }
      }
      
      public String exec(Tuple input) {
         return new String("Hello " + input.get(0));
      }
      

      Similar to Hive, will need a UDFMethodResolver to match the most appropriate method or fallback to exec(Tuple). With bytecode generation, instead of doing Method.invoke() we can just make direct calls to the method which will improve performance. Will create a separate jira to do Method.invoke() when pig.opt.bytecode.gen=false.

      Attachments

        Activity

          People

            rohini Rohini Palaniswamy
            rohini Rohini Palaniswamy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: