adelapena commented on code in PR #3444:
URL: https://github.com/apache/cassandra/pull/3444#discussion_r1696865970
##########
src/java/org/apache/cassandra/cql3/restrictions/SimpleRestriction.java:
##########
@@ -217,7 +219,7 @@ public boolean isSupportedBy(Index index)
@Override
public List<ClusteringElements> values(QueryOptions options)
{
- assert operator == Operator.EQ || operator == Operator.IN || operator
== Operator.ANN;
+ assert operator == Operator.EQ || operator == Operator.IN || operator
== Operator.ANN || operator == Operator.NEQ || operator == Operator.NOT_IN;
Review Comment:
Nit: we can split the long line
```suggestion
assert operator == Operator.EQ ||
operator == Operator.NEQ ||
operator == Operator.IN ||
operator == Operator.NOT_IN ||
operator == Operator.ANN;
```
##########
test/unit/org/apache/cassandra/cql3/validation/operations/SelectTest.java:
##########
@@ -1913,7 +2009,7 @@ public void
testAllowFilteringOnPartitionKeyWithoutIndicesWithCollections() thro
execute("INSERT INTO %s (a, b, c, d, e) VALUES (1, 4, [1, 2], {2, 4},
{1: 2})");
execute("INSERT INTO %s (a, b, c, d, e) VALUES (2, 3, [3, 6], {6, 12},
{3: 6})");
- beforeAndAfterFlush(() -> {
+ //beforeAndAfterFlush(() -> {
Review Comment:
Why is this commented? It seems to work fine
##########
src/java/org/apache/cassandra/cql3/restrictions/SimpleRestriction.java:
##########
@@ -327,7 +329,7 @@ public void addToRowFilter(RowFilter filter, IndexRegistry
indexRegistry, QueryO
{
case SINGLE_COLUMN:
List<ByteBuffer> buffers = bindAndGet(options);
- if (operator == Operator.IN || operator == Operator.BETWEEN)
+ if (operator.kind() == Operator.Kind.MULTI_VALUE ||
operator.kind() == Operator.Kind.TERNARY)
Review Comment:
Nit: can be simplified to `operator.kind() != Operator.Kind.BINARY`?
##########
src/antlr/Parser.g:
##########
@@ -1814,6 +1814,7 @@ relation[WhereClause.Builder clauses]
| name=cident '[' key=term ']' type=relationType t=term {
$clauses.add(Relation.mapElement(name, key, type, t)); }
| ids=tupleOfIdentifiers
( K_IN inValue=multiColumnInValues {
$clauses.add(Relation.multiColumn(ids, Operator.IN, inValue)); }
+ | K_NOT K_IN inValue=multiColumnInValues {
$clauses.add(Relation.multiColumn(ids, Operator.NOT_IN, inValue)); }
Review Comment:
Can this be combined with the previous line by using `inOperator`? As in:
```
( rt=inOperator inValue=multiColumnInValues {
$clauses.add(Relation.multiColumn(ids, rt, inValue)); }
```
--
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]