You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2014/08/04 18:08:13 UTC
[jira] [Commented] (CASSANDRA-7674) Add implicit casting of UDF
arguments
[ https://issues.apache.org/jira/browse/CASSANDRA-7674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084833#comment-14084833 ]
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: https://issues.apache.org/jira/browse/CASSANDRA-7674
> 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
(v6.2#6252)