[
https://issues.apache.org/jira/browse/CASSANDRA-8241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14543942#comment-14543942
]
Robert Stupp commented on CASSANDRA-8241:
-----------------------------------------
The primary reason for not using a template approach was that I didn't wanted
to pull in another dependency.
Using a template approach also felt a bit over-engineered, since the most
dynamic part (one function signature and the UDF input parameters and return
types) might look even more complicated.
What I could try is this:
* Extract the static part of the source to a resource file
* Add placeholders for the complicated parts (argument + return value handling)
to that resource file
* Replace these placeholders with a simple search&replace or regexp
functionality
WDYT?
> Use ecj [was: javac] instead of javassist
> -----------------------------------------
>
> Key: CASSANDRA-8241
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8241
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Robert Stupp
> Assignee: Robert Stupp
> Labels: udf
> Fix For: 2.2 beta 1
>
> Attachments: 8241-ecj-v2.txt, 8241-ecj.txt, udf-java-javac.txt
>
>
> Using JDK's built-in Java-Compiler API has some advantages over javassist.
> Although compilation feels a bit slower, Java compiler API has some
> advantages:
> * boxing + unboxing works
> * generics work
> * compiler error messages are better (or at least known) and have line/column
> numbers
> The implementation does not use any temp files. Everything's in memory.
> Patch attached to this issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)