The math functions found in exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java is not generated using freemarker, they were written by hand.

However look at the patch in jira DRILL-320 <https://issues.apache.org/jira/browse/DRILL-320> which will replace the existing MathFunctions class and uses freemarker to generate code for basic math functions (+,-,*,/)

Thanks
Mehant

On 2/4/14, 10:24 AM, Akila Wajirasena wrote:
Hi,

Is this the same for the math functions found in
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java
?




On Tue, Feb 4, 2014 at 11:20 PM, Steven Phillips <[email protected]>wrote:

Drill uses compile time code generation for  implementing functions, rather
than needing to implement by hand.

Please take a look at exec/java-exec/src/main/codegen/ to see how it is
done, and model any new functions on that.

For reference, here is info about freemarker:

http://freemarker.org/


On Tue, Feb 4, 2014 at 8:52 AM, Akila Wajirasena <
[email protected]
wrote:
Hi,

I'm Akila, a software engineer from Sri Lanka. I would like to contribute
to this project.
I went through the materials provided in the site and thought of starting
to implement some
drill functions. I have some questions regarding that;

I found the document on functions needed to be implemented [1]. I would
like to know if any of those
functions already implemented?

Then I found ComparisonFunctions class mentioned in "Contributing" wiki
page
is commented out. Is it no longer in use?


[1]


https://docs.google.com/spreadsheet/ccc?key=0Aoz_rQ71aIZ5dC0tN2FhNzY1c0JzV1RpOTZQM0hMdEE&usp=sharing#gid=0
--
Regards
Akila Wajirasena




Reply via email to