You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2016/11/21 19:55:59 UTC

[jira] [Updated] (CASSANDRA-11946) Use the return type when resolving function on ambiguous calls

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

Benjamin Lerer updated CASSANDRA-11946:
---------------------------------------
    Fix Version/s:     (was: 3.x)

> Use the return type when resolving function on ambiguous calls
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-11946
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11946
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Sylvain Lebresne
>
> Currently, when we have multiple overloads of a function we only use the argument to try to resolve the function. When that resolution is ambiguous, we currently throw an error, but in many case (in the {{WHERE}} clause at least) we know which type the result is supposed to be so we could use that information to try to disambiguate.
> The main use case I'm thinking of is the {{now()}} function. Currently, we have it only for {{timeuuid}}. But we should likely provide the equivalent for other time-base types ({{timestamp}}, {{date}} and {{time}}). Except that currently we'd have to use other names that {{now}} and that would probably be a bit ugly. If we implement what's above, we'll be able to have overloads of {{now()}} for all date types and in many case it'll work how users want out of the bose (that is, {{WHERE t = now()}} will work whatever date-based type {{t}} is). And in the cases where you can't disambiguate, having to do {{(time)now()}} is not really worth than if we had a {{timeNow()}} function specific to the {{time}} type.
> Also, in principle the change is just a few lines of code.



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