cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Resolved] (CASSANDRA-11946) Use the return type when resolving function on ambiguous calls
Date Mon, 21 Nov 2016 19:54:58 GMT


Benjamin Lerer resolved CASSANDRA-11946.
    Resolution: Duplicate

> Use the return type when resolving function on ambiguous calls
> --------------------------------------------------------------
>                 Key: CASSANDRA-11946
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Sylvain Lebresne
>             Fix For: 3.x
> 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

View raw message