maedhroz commented on code in PR #4561:
URL: https://github.com/apache/cassandra/pull/4561#discussion_r2829374841
##########
src/java/org/apache/cassandra/cql3/Relation.java:
##########
@@ -204,7 +204,10 @@ public SingleRestriction toRestriction(TableMetadata
table, VariableSpecificatio
AbstractType<?> baseType = column.type.unwrap();
checkFalse(baseType instanceof ListType, "Indexes on list entries
(%s[index] = value) are not supported.", column.name);
checkTrue(baseType instanceof MapType, "Column %s cannot be used
as a map", column.name);
- checkTrue(baseType.isMultiCell(), "Map-entry predicates on frozen
map column %s are not supported", column.name);
+
+ if (column.isClusteringColumn() && baseType.isCollection() &&
!column.type.isMultiCell())
+ throw invalidRequest("Map-entry predicates on frozen map
column %s are not supported", column.name);
Review Comment:
nit: Might be useful to create a constant from this and reuse it in places
like tests. Could save us in the future from having to make an annoying set of
changes to that string in several places (ex. `CollectionIndexingTest`)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]