> On July 2, 2012, 11:14 p.m., Julien Le Dem wrote: > > /trunk/src/org/apache/pig/scripting/groovy/GroovyAlgebraicEvalFunc.java, > > lines 76-79 > > <https://reviews.apache.org/r/5591/diff/4/?file=119013#file119013line76> > > > > it does not do anything more than calling the parent then it does not > > realy need to override the method. (same for other classes here)
Good point. Corrected. > On July 2, 2012, 11:14 p.m., Julien Le Dem wrote: > > /trunk/test/org/apache/pig/test/TestUDFGroovy.java, lines 336-361 > > <https://reviews.apache.org/r/5591/diff/4/?file=119019#file119019line336> > > > > What about this syntax? > > > > class Sumalg extends AgebraicGroovyUDF {", > > public Tuple initial(Tuple t) { > > ... > > } > > public Tuple intermed(Tuple t) { > > ... > > } > > public long final(Tuple t) { > > ... > > } > > } > > > > This would be consistent with the JRuby impl (and java in general) As I've already expressed, my experience with Groovy UDFs is that people tend to build libraries of UDFs in a single Groovy class. Sticking to the Java way of doing UDFs would multiply the REGISTER statements in the Pig scripts (one per function vs one per library). The Java way of doing things is fine because Java source code is compiled and packaged in a single jar which is then registered. I'd like to retain the flexibility of being able to provide a single Groovy file containing multiple (usually related) UDFs, i.e. time.groovy, currency.groovy, etc. > On July 2, 2012, 11:14 p.m., Julien Le Dem wrote: > > /trunk/src/org/apache/pig/scripting/groovy/AccumulatorAccumulate.java, line > > 28 > > <https://reviews.apache.org/r/5591/diff/4/?file=119006#file119006line28> > > > > javadoc please for these Added javadoc for AccumulatorXXX and AlgebraicXXX annotations. > On July 2, 2012, 11:14 p.m., Julien Le Dem wrote: > > /trunk/src/org/apache/pig/scripting/groovy/GroovyAlgebraicEvalFunc.java, > > line 179 > > <https://reviews.apache.org/r/5591/diff/4/?file=119013#file119013line179> > > > > this is actually a funcspec and could return > > "org.apache....Final('Double')" if that helps. I'll stick with Final.class.getName() - Mathias ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5591/#review8819 ----------------------------------------------------------- On July 2, 2012, 9:23 p.m., Mathias Herberts wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5591/ > ----------------------------------------------------------- > > (Updated July 2, 2012, 9:23 p.m.) > > > Review request for pig, Julien Le Dem and Jonathan Coveney. > > > Description > ------- > > Adds support for Groovy UDFs in Pig. > > > This addresses bug PIG-2763. > https://issues.apache.org/jira/browse/PIG-2763 > > > Diffs > ----- > > /trunk/ivy.xml 1353307 > /trunk/ivy/libraries.properties 1353307 > /trunk/src/org/apache/pig/scripting/ScriptEngine.java 1356486 > /trunk/src/org/apache/pig/scripting/groovy/AccumulatorAccumulate.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/AccumulatorCleanup.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/AccumulatorGetValue.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/AlgebraicFinal.java PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/AlgebraicInitial.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/AlgebraicIntermed.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/GroovyAccumulatorEvalFunc.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/GroovyAlgebraicEvalFunc.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/GroovyEvalFunc.java PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/GroovyEvalFuncObject.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/GroovyScriptEngine.java > PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/GroovyUtils.java PRE-CREATION > /trunk/src/org/apache/pig/scripting/groovy/OutputSchemaFunction.java > PRE-CREATION > /trunk/test/org/apache/pig/test/TestUDFGroovy.java PRE-CREATION > /trunk/test/unit-tests 1353307 > > Diff: https://reviews.apache.org/r/5591/diff/ > > > Testing > ------- > > > Thanks, > > Mathias Herberts > >
