You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Stupp (JIRA)" <ji...@apache.org> on 2015/07/28 15:03:04 UTC

[jira] [Resolved] (CASSANDRA-8289) Allow users to debug/test UDF

     [ https://issues.apache.org/jira/browse/CASSANDRA-8289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Stupp resolved CASSANDRA-8289.
-------------------------------------
       Resolution: Later
    Fix Version/s:     (was: 3.x)

Difficult to implement right - closing as later for now.

> Allow users to debug/test UDF
> -----------------------------
>
>                 Key: CASSANDRA-8289
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8289
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Robert Stupp
>              Labels: udf
>
> Currently it's not possible to execute unit tests against UDFs nor is it possible to debug them.
> Idea is to provide some kind of minimalistic "framework" to execute at least scalar UDFs from a unit test.
> Basically that UDF-executor would take the information that 'CREATE FUNCTION' takes, compiles that UDF and allows the user to call it using plain java calls.
> In case of the Java language it could also generate Java source files to enable users to set breakpoints.
> It could also check for timeouts to identify e.g. "endless loop" scenarios or do some byte code analysis to check for "evil" package usage.
> For example:
> {code}
> import org.apache.cassandra.udfexec.*
> public class MyUnitTest {
>   @Test
>   public void testIt() {
>     UDFExec sinExec = UDFExec.compile("sin", "java",
>       Double.class, // return type
>       Double.class  // argument type(s)
>     );
>     sinExec.call(2.0d);
>     sinExec.call(null);
>   }
> }
> {code}
> Note: this one is not intended to do some "magic" to start a debugger on a C* node and debug it there.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)