cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Shaw (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL
Date Thu, 21 Apr 2011 21:31:05 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022926#comment-13022926
] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------


{quote}
I'm slightly against having both Float and Double – I'd like to discourage premature optimization
and using 4 bytes for floating point instead of 8 is almost always the wrong space:accuracy
tradeoff today.
{quote}

I guess I added Float and Double together because they were so similar it seemed silly not
to. It is also a JDBC type and seemed easy enough to provide and make implementing the next
stages of JDBC easier.

Selfishly, my implementations use a lot of small float numbers like: "1.2" or "66.667" so
a row might have 50 columns of such data and 5-50 million rows. So a selfish trend on my part
is to provide the smallest representation on bytes stored/in-memory. 

{quote}
Similarly not sure there is a raison d'être for ByteType.
{quote}

My reasoning was more about a guaranteed length that was short. We plan to put ENUMs into
them in prepared statements. Again, selfishly, if we have a lot of Float usage we *really*
have a lot of numbers between 1-10 to store! So all these volumes above are just more exaggerated
in our need to store lots of short numbers in an optimal width. But I do understand the variable
integer {{IntegerType}} could be used. 


{quote}
This looks wrong:
{quote}

Yep... Cut-n-paste in a hurry... will get you every time! I'll fix with v3 patch. (starting
to see a trend)

Yes. I'll look into the error of my "whitespace" ways.

I will try to conjure some tests that dovetail into the existing testing framework.

A separate ticket would probably be good for ANTLR work. I'll give it a shot but am about
30 years rusty on parsing grammars. But I'll gladly give it a try.




> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message