You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Francisco Guerrero (Jira)" <ji...@apache.org> on 2022/06/16 22:17:00 UTC
[jira] [Assigned] (CASSANDRA-17695) AbstractCell#toString throws MarshalException for cell in collection
[ https://issues.apache.org/jira/browse/CASSANDRA-17695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francisco Guerrero reassigned CASSANDRA-17695:
----------------------------------------------
Assignee: Francisco Guerrero
> 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
>
> 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.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org