You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2014/08/21 18:03:12 UTC

[jira] [Updated] (CASSANDRA-7812) DROP FUNCTION drops all function with a given name

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

Dave Brosius updated CASSANDRA-7812:
------------------------------------

    Description: 
We support multiple overloads of a given function name, so that you can define:
{noformat}
CREATE FUNCTION div(int a, int b) RETURNS int 'myDivOnIntegerFct';
CREATE FUNCTION div(double a, double b) RETURNS double 'myDivOnDoubleFct';
{noformat}
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:
{noformat}
DROP FUNCTION div(double, double);
{noformat}
Also, and while that's probably debatable, I'd also suggest to change the behavior of:
{noformat}
DROP FUNCTION div;
{noformat}
to complain if the there is multiple overload of the {{div}} method instead of dropping all overload as it feels somewhat foot-shooting otherwise.

  was:
We support multiple overloads of a given function name, so that you can define:
{noformat}
CREATE FUNCTION div(int a, int b) RETUNS int 'myDivOnIntegerFct';
CREATE FUNCTION div(double a, double b) RETUNS double 'myDivOnDoubleFct';
{noformat}
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:
{noformat}
DROP FUNCTION div(double, double);
{noformat}
Also, and while that's probably debatable, I'd also suggest to change the behavior of:
{noformat}
DROP FUNCTION div;
{noformat}
to complain if the there is multiple overload of the {{div}} method instead of dropping all overload as it feels somewhat foot-shooting otherwise.


> DROP FUNCTION drops all function with a given name
> --------------------------------------------------
>
>                 Key: CASSANDRA-7812
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7812
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>             Fix For: 3.0
>
>
> We support multiple overloads of a given function name, so that you can define:
> {noformat}
> CREATE FUNCTION div(int a, int b) RETURNS int 'myDivOnIntegerFct';
> CREATE FUNCTION div(double a, double b) RETURNS double 'myDivOnDoubleFct';
> {noformat}
> 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:
> {noformat}
> DROP FUNCTION div(double, double);
> {noformat}
> Also, and while that's probably debatable, I'd also suggest to change the behavior of:
> {noformat}
> DROP FUNCTION div;
> {noformat}
> to complain if the there is multiple overload of the {{div}} method instead of dropping all overload as it feels somewhat foot-shooting otherwise.



--
This message was sent by Atlassian JIRA
(v6.2#6252)