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

David Capwell commented on CASSANDRA-16155:
-------------------------------------------

[~ifesdjeen] this is for test table test_virtual_ks.vt3, was hoping we could 
have a test for the table that actually broke which triggered this.  The 
comment was more that a public table failed and we didn't have test coverage to 
detect it, so would be good to have a basic test that makes sure it mostly 
works.  I am 100% fine with the test you have, more asking for an additional 
one.

bq. David Capwell you've also mentioned in review comment "for me: the issue 
was that the method didn't take it, but takes Object...", what do you think can 
be an alternative here? Unfortunately we do not have a more specific type to 
prevent something similar happening in the future.

When it comes to Object... that gets tricky as it traps everything... not sure 
how we could prevent this from happening with that signature...  The best hack 
I can think of is a static analyzer tool (custom to us) that checks these 
things, nothing else is coming to mind.

bq. David Capwell you've also mentioned in review comment "for me:

Since reviews can go back-and-forth over multiple days, I tend to leave "for 
me" comments to remind me later of stuff I knew while reviewing as I will 
likely forget this the next time I need to look at it; these comments can 
mostly be ignored as they are just review documentation.

> ByteBufferAccessor cast exceptions are thrown when trying to query a virtual 
> table
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16155
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16155
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Feature/Virtual Tables
>            Reporter: Alex Petrov
>            Assignee: Alex Petrov
>            Priority: Normal
>
> Start a fresh trunk node, and try to run
> SELECT * FROM system_views.local_read_latency ;
> You’ll get: 
> {code:java}
> ERROR [Native-Transport-Requests-1] 2020-09-30 09:44:45,099 
> ErrorMessage.java:457 - Unexpected exception during request
>  java.lang.ClassCastException: 
> org.apache.cassandra.db.marshal.ByteBufferAccessor cannot be cast to 
> java.lang.String
>          at 
> org.apache.cassandra.serializers.AbstractTextSerializer.serialize(AbstractTextSerializer.java:29)
>          at 
> org.apache.cassandra.db.marshal.AbstractType.decompose(AbstractType.java:131) 
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to