Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-8063

Consider removing UDF-as-class functionality

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.2.0 beta 1
    • Component/s: None
    • Labels:
    • Severity:
      Normal

      Description

      We've introduce 2 ways to provide (scalar) UDFs: either by providing a class+method name (and assuming C* can find such class and method in the classpath), or by providing the body of the function directly in the CREATE FUNCTION statement (with such body being able to be in either java or some variety of scripting languages).

      I submit that we remove the first option: the declaration of functions from a class+method name. I was the first to insist on adding it, but in hindsight I think it adds more complexity/confusion than anything else. More specifically, I think the UDF-as-class option is always inferior to CASSANDRA-7562 because:

      1. it's more error prone. You have to manually deploy the class containing the function to every C* node (and make sure it is in the classpath). It's way too easy to end up with some node not having the function due to simple operator error.
      2. it's not faster. In fact, post-CASSANDRA-7924, the UDF-as-java-source is probably faster since it doesn't involve reflection while the UDF-as-class option does.

      Overall, I think removing the UDF-as-class will simplify things without really losing anything (of course, we can re-evaluate this in the future if new arguments arises, but it's easier to add than to remove).

        Attachments

        1. 8063.txt
          16 kB
          Robert Stupp

          Issue Links

            Activity

              People

              • Assignee:
                snazy Robert Stupp
                Reporter:
                slebresne Sylvain Lebresne
                Authors:
                Robert Stupp
                Reviewers:
                Sylvain Lebresne
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: