You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/10/02 20:59:43 UTC

[GitHub] [cassandra] maedhroz opened a new pull request #766: ByteBufferAccessor throws ClassCastException when trying to query system_views.local_read_latency

maedhroz opened a new pull request #766:
URL: https://github.com/apache/cassandra/pull/766


   stop passing the accessor as the first var arg to CompositeType#decompose() when building virtual table datasets


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] maedhroz closed pull request #766: ByteBufferAccessor throws ClassCastException when trying to query system_views.local_read_latency

Posted by GitBox <gi...@apache.org>.
maedhroz closed pull request #766:
URL: https://github.com/apache/cassandra/pull/766


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] dcapwell commented on a change in pull request #766: ByteBufferAccessor throws ClassCastException when trying to query system_views.local_read_latency

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #766:
URL: https://github.com/apache/cassandra/pull/766#discussion_r499062004



##########
File path: src/java/org/apache/cassandra/db/virtual/SimpleDataSet.java
##########
@@ -84,7 +86,7 @@ private DecoratedKey makeDecoratedKey(Object... partitionKeyValues)
     {
         ByteBuffer partitionKey = partitionKeyValues.length == 1
                                 ? decompose(metadata.partitionKeyType, partitionKeyValues[0])
-                                : ((CompositeType) metadata.partitionKeyType).decompose(ByteBufferAccessor.instance, partitionKeyValues);

Review comment:
       for me: the issue was that the method didn't take it, but takes `Object...`
   
   ```
   public ByteBuffer decompose(Object... objects)
       {
           assert objects.length == types.size();
   
           ByteBuffer[] serialized = new ByteBuffer[objects.length];
           for (int i = 0; i < objects.length; i++)
           {
               ByteBuffer buffer = ((AbstractType) types.get(i)).decompose(objects[i]);
               serialized[i] = buffer;
           }
           return build(ByteBufferAccessor.instance, serialized);
       }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org