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

DROP FUNCTION drops all function with a given name

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.2.0 beta 1
    • None
    • None

    Description

      We support multiple overloads of a given function name, so that you can define:

      CREATE FUNCTION div(int a, int b) RETURNS int 'myDivOnIntegerFct';
      CREATE FUNCTION div(double a, double b) RETURNS double 'myDivOnDoubleFct';
      

      In other words, a function is uniquely identified by it's name and it's argument types.

      But the DROP FUNCTION syntax currently only take a function name and if there is multiple overload for that name, drop all of them without any way to drop one without the other.

      So we should probably allow to optionally pass the type arguments to DROP to select a specific overloading, something like:

      DROP FUNCTION div(double, double);
      

      Also, and while that's probably debatable, I'd also suggest to change the behavior of:

      DROP FUNCTION div;
      

      to complain if the there is multiple overload of the div method instead of dropping all overload as it feels somewhat foot-shooting otherwise.

      Attachments

        1. 7812.txt
          11 kB
          Robert Stupp

        Activity

          People

            snazy Robert Stupp
            slebresne Sylvain Lebresne
            Robert Stupp
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: