cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-7395) Support for pure user-defined functions (UDF)
Date Tue, 15 Jul 2014 21:35:06 GMT


Robert Stupp updated CASSANDRA-7395:

    Attachment: 7395.txt

new patch with support for UDFs as Java source using javassist

CREATE OR REPLACE FUNCTION double foobar(val double) AS JAVA
  // parameter val is of type java.lang.Double
  /* return type is of type java.lang.Double */
  if (val == null) {
    return null;
  double v = Math.sin( val.doubleValue() );
  return Double.valueOf(v);
But does not work with cqlsh (cqlsh needs to be changed to support ';' inside statements /
CREATE BUNDLE/FUNCTION syntax not yet in cqlsh).

Next steps:
* code cleanup (validate UDFs upon statement execution before writing to 
system KS table)
* unit tests

> Support for pure user-defined functions (UDF)
> ---------------------------------------------
>                 Key: CASSANDRA-7395
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>              Labels: cql
>             Fix For: 3.0
>         Attachments: 7395.txt
> We have some tickets for various aspects of UDF (CASSANDRA-4914, CASSANDRA-5970, CASSANDRA-4998)
but they all suffer from various degrees of ocean-boiling.
> Let's start with something simple: allowing pure user-defined functions in the SELECT
clause of a CQL query.  That's it.
> By "pure" I mean, must depend only on the input parameters.  No side effects.  No exposure
to C* internals.  Column values in, result out.

This message was sent by Atlassian JIRA

View raw message