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

Anuja Mandlecha edited comment on CASSANDRA-6538 at 2/23/15 11:54 AM:
----------------------------------------------------------------------

{quote} As long as BytesType is declared as the type of argument, the type 
system ensure it will only be called on that{quote}
This is what is expected, but as per the code in BytesType.java in cassandra 
2.1 branch on git as given below:
{code}
    public boolean isValueCompatibleWithInternal(AbstractType<?> otherType)
    {
        // BytesType can read anything
        return true;
    }
{code}
true is returned for every standard type (like text,int etc) and the sizeof 
calculates size for them,which is contradictory to how we want the sizeof() to 
behave. That is why I had introduced the type check in Selection.



was (Author: anuja_mandlecha):
{quote} As long as BytesType is declared as the type of argument, the type 
system ensure it will only be called on that{quote}
This is what is expected, but as per the code in BytesType.java as given below:
{code}
    public boolean isValueCompatibleWithInternal(AbstractType<?> otherType)
    {
        // BytesType can read anything
        return true;
    }
{code}
true is returned for every standard type (like text,int etc) and the sizeof 
calculates size for them,which is contradictory to how we want the sizeof() to 
behave. That is why I had introduced the type check in Selection.

> 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