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

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

I have 2 "problems" with this ticket so far:
# I'm on the fence on whether allowing such function on non-frozen collection 
really make sense. In that case, the size returned will *not* be the size the 
collection has in the database, and I'm a bit afraid people will 
misunderstand/misuse it.
# We actually don't currently have a good way to declare a function that 
applies to _any_ type. The attached patch works around this by basically 
breaking the type system, making the blob type an "accept everything type" but 
that's not ok (I'm *strongly* against doing that).

Overall, what I'd suggest would be to add a method that only work on blobs. If 
you nedd the size of another type, we actually have the {{xAsBlob}} method for 
that so that's easily done (and it makes it more clear what is returned imo). 
It's worth noting that this won't work for frozen types (or collection in 
general) since we don't have {{xAsBlob}} functions for those, but imo it's a 
somewhat separate problem, one that should be tackled in another ticket.


> 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, 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