cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7674) Add implicit casting of UDF arguments
Date Mon, 04 Aug 2014 16:08:13 GMT


Sylvain Lebresne commented on CASSANDRA-7674:

Not convinced we need something here.

Since CASSANDRA-6766 we have some notion of sub-typing, so if someone want to write just one
method for all integers, it can use {{varint}} and both {{int}} and {{bigint}} will properly
be handled.

Granted the current sub-typing relation is wary of the types internal representation so that
{{int}} is not a subtype of {{bigint}} (though both are subtype of {{varint}}). The reasoning
being that, imo, we shouldn't do automagical stuff with the data size in a database (it's
arguably a personal opinion, but I kind of feel strongly about it).

> Add implicit casting of UDF arguments
> -------------------------------------
>                 Key: CASSANDRA-7674
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Robert Stupp
> Writing implementations for each possible combination of even most "primitive" CQL types
is waste of time and results in unclear code.
> E.g. a {{divide}} function should accept {{int, bigint, float, double}} for the first
and second paramter.
> Better if UDF implementation can automagically do some up-casting ({{int}} to {{bigint}},
{{float}} to {{double}} etc).

This message was sent by Atlassian JIRA

View raw message