[ 
https://issues.apache.org/jira/browse/CASSANDRA-17695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yifan Cai updated CASSANDRA-17695:
----------------------------------
    Summary: Fix AbstractCell#toString throws MarshalException for cell in 
collection  (was: AbstractCell#toString throws MarshalException for cell in 
collection)

> Fix AbstractCell#toString throws MarshalException for cell in collection
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17695
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17695
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Core
>            Reporter: Yifan Cai
>            Assignee: Francisco Guerrero
>            Priority: Normal
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> AbstractCell#toString is broken when calling on some cells in multi-cell 
> collections.
> With the following types are unmarshallable: [date, duration, smallint, time, 
> tinyint].
> The test to discover the unmarshallable types is
> {code:java}
> @Test
> public void testUnmarshallableInMulticellCollection()
> {
>     List<CQL3Type.Native> unmarshallableTypes = new ArrayList<>();
>     for (CQL3Type.Native nativeType : CQL3Type.Native.values())
>     {
>         ColumnMetadata c = fakeColumn("c", 
> MapType.getInstance(Int32Type.instance, nativeType.getType(), true));
>         BufferCell cell = BufferCell.tombstone(c, 0, 4, 
> CellPath.create(ByteBufferUtil.bytes(4)));
>         try
>         {
>             cell.toString();
>         }
>         catch (MarshalException m)
>         {
>             unmarshallableTypes.add(nativeType);
>         }
>     }
>     System.out.println("Unmarshallable types: " + unmarshallableTypes);
> }
> {code}
> At the first sight, the error is caused by trying to deserialize the values 
> of the tombstone cells. The values are empty, hence the failure.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to