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

Sylvain Lebresne commented on CASSANDRA-6538:
---------------------------------------------

You're right, I forgot that we got that as part of CASSANDRA-6766 and did made 
the blob type accept anything. In hindisght, I'm not sure this was the best of 
idea (and it is somewhat inconcistent with how drivers deals with blob), but I 
guess it's too late now. And in any case, it's not really something that is in 
scope for this ticket. And that's my main point: we shouldn't special case any 
part of the code every time we add a new function or we'll end up with 
inconsistent behavior all over the place.

But as a side note, your changes to {{Selection}} makes even less sense in this 
light, they are basically a no-op since you're just inlining the BytesType 
{{isValueCompatible}} body.

Anyway, since we do accept everything for a blob, then I suggest we just let it 
be that way. That is, let's just remove the {{Selection}} changes from your 
patch, fix the use of {{ByteBuffer.array().length}} and rename the method to 
{{byteSizeOf}} ({{sizeOf}} is just too generic a name imo, people will be 
confused that applied to a collection this doesn't return the number of 
elements of the collection).


> Provide a read-time CQL function to display the data size of columns and rows
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6538
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6538
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Johnny Miller
>            Priority: Minor
>              Labels: cql
>         Attachments: 6538.patch, CodeSnippet.txt, sizeFzt.PNG
>
>
> It would be extremely useful to be able to work out the size of rows and 
> columns via CQL. 



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

Reply via email to