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

Andres de la Peña commented on CASSANDRA-17623:
-----------------------------------------------

It seems that Circle is not properly printing the test results for the provided 
runs, which makes it difficult to know what tests have failed. Trying again 
with midres pre-commit workflows:
||PR||CI||
|[3.0  
|https://github.com/apache/cassandra/pull/1636]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1566/workflows/8fdd00f6-3771-4479-8667-873238cd983b]|
|[3.11 
|https://github.com/apache/cassandra/pull/1635]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1563/workflows/d3aa9a48-a877-47d4-9dde-05d5cfc47fde]|
|[4.0  
|https://github.com/apache/cassandra/pull/1634]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1567/workflows/12090435-5ed4-45f0-ab18-60ed860dd305]
 
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1567/workflows/f3465751-41d0-4643-8cbb-5893b83401dd]|
|[4.1  
|https://github.com/apache/cassandra/pull/1633]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1564/workflows/e8dbd50a-d574-4ef8-a741-795a93cd3e85]
 
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1564/workflows/31dc3bd6-0006-47f0-af4e-5cd568be89be]|
|[trunk|https://github.com/apache/cassandra/pull/1621]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1565/workflows/b9ad62b4-e1f9-425f-9808-2a4488b3aa1a]
 
[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1565/workflows/4af37b70-e43d-4c67-8711-151055ba3285]|

> Frozen maps may be serialized unsorted, causing inability to query later
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17623
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17623
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Semantics
>            Reporter: Doug Rohrer
>            Assignee: Doug Rohrer
>            Priority: Normal
>             Fix For: 4.0.x, 4.1-beta, 4.x
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> CASSANDRA-7859 introduced the ability to use frozen collections as parts of 
> primary keys. This +requires+ all frozen maps to be persisted with their 
> entries sorted by the map keys. If the map is +not+ sorted correctly, it 
> becomes impossible to project all of the map values out of the map using the 
> map projection/selection syntax. For example, the select below would fail if 
> the map was not sorted correctly and the higher-valued key was persisted 
> first:
> {code:sql}
> CREATE TABLE test.test (k text, c frozen<map<text, text>>, PRIMARY KEY (k, 
> c));
> INSERT INTO test.test (k, c) VALUES ('key', {'z':'second_value', 
> 'a':'first_value'});
> SELECT k, c['a'] from test.test where k='key' -- c['a'] would return NULL here
> {code}
> Additionally, if you attempted to select just that row by using the complete 
> map value in a WHERE clause, which is also supported, it would return no rows 
> unless the map provided by the query processor just happened to be sorted the 
> same way as the persisted value.
> However, there is a bug in Maps.java where we don't actually use a SortedMap 
> in {{Maps.Value#fromSerialized}}, which manifests if a client sends an 
> unsorted map as a bound parameter to a query on insert or select. In either 
> case, the map may not be sorted correctly, leading to either invalid data 
> being persisted to disk (in the INSERT case) or the query not being able to 
> be executed/returning 0 rows even though a row _should_ exist (SELECT).
> This bug affects any usage of parameterized queries (tested with the DataStax 
> driver, and was originally discovered when using the CQLSSTableWriter code to 
> write data locally).



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to