@@ -224,7 +224,7 @@ protected BaseRowIterator<?> applyToPartition(BaseRowIterator<?> partition)
224
224
225
225
// Short-circuit all partitions that won't match based on static and partition keys
226
226
for (Expression e : partitionLevelExpressions )
227
- if (!e .isSatisfiedBy (metadata , partition .partitionKey (), partition .staticRow ()))
227
+ if (!e .isSatisfiedBy (metadata , partition .partitionKey (), partition .staticRow (), nowInSec ))
228
228
{
229
229
partition .close ();
230
230
return null ;
@@ -251,7 +251,7 @@ public Row applyToRow(Row row)
251
251
return null ;
252
252
253
253
for (Expression e : rowLevelExpressions )
254
- if (!e .isSatisfiedBy (metadata , pk , purged ))
254
+ if (!e .isSatisfiedBy (metadata , pk , purged , nowInSec ))
255
255
return null ;
256
256
257
257
return row ;
@@ -303,7 +303,7 @@ public boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey,
303
303
304
304
for (Expression e : expressions )
305
305
{
306
- if (!e .isSatisfiedBy (metadata , partitionKey , purged ))
306
+ if (!e .isSatisfiedBy (metadata , partitionKey , purged , nowInSec ))
307
307
return false ;
308
308
}
309
309
return true ;
@@ -522,9 +522,9 @@ public void validateForIndexing()
522
522
* (i.e. it should come from a RowIterator).
523
523
* @return whether the row is satisfied by this expression.
524
524
*/
525
- public abstract boolean isSatisfiedBy (TableMetadata metadata , DecoratedKey partitionKey , Row row );
525
+ public abstract boolean isSatisfiedBy (TableMetadata metadata , DecoratedKey partitionKey , Row row , long nowInSec );
526
526
527
- protected ByteBuffer getValue (TableMetadata metadata , DecoratedKey partitionKey , Row row )
527
+ protected ByteBuffer getValue (TableMetadata metadata , DecoratedKey partitionKey , Row row , long nowInSec )
528
528
{
529
529
switch (column .kind )
530
530
{
@@ -697,7 +697,7 @@ public static class SimpleExpression extends Expression
697
697
super (column , operator , value );
698
698
}
699
699
700
- public boolean isSatisfiedBy (TableMetadata metadata , DecoratedKey partitionKey , Row row )
700
+ public boolean isSatisfiedBy (TableMetadata metadata , DecoratedKey partitionKey , Row row , long nowInSec )
701
701
{
702
702
// We support null conditions for LWT (in ColumnCondition) but not for RowFilter.
703
703
// TODO: we should try to merge both code someday.
@@ -711,7 +711,7 @@ public boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey,
711
711
// representation. See CASSANDRA-11629
712
712
if (column .type .isCounter ())
713
713
{
714
- ByteBuffer foundValue = getValue (metadata , partitionKey , row );
714
+ ByteBuffer foundValue = getValue (metadata , partitionKey , row , nowInSec );
715
715
if (foundValue == null )
716
716
return false ;
717
717
@@ -721,7 +721,7 @@ public boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey,
721
721
else
722
722
{
723
723
// Note that CQL expression are always of the form 'x < 4', i.e. the tested value is on the left.
724
- ByteBuffer foundValue = getValue (metadata , partitionKey , row );
724
+ ByteBuffer foundValue = getValue (metadata , partitionKey , row , nowInSec );
725
725
return foundValue != null && operator .isSatisfiedBy (column .type , foundValue , value );
726
726
}
727
727
}
@@ -736,7 +736,7 @@ else if (operator.appliesToCollectionElements() || operator.appliesToMapKeys())
736
736
}
737
737
else
738
738
{
739
- ByteBuffer foundValue = getValue (metadata , partitionKey , row );
739
+ ByteBuffer foundValue = getValue (metadata , partitionKey , row , nowInSec );
740
740
return foundValue != null && operator .isSatisfiedBy (column .type , foundValue , value );
741
741
}
742
742
}
@@ -840,7 +840,7 @@ public boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey,
840
840
}
841
841
else
842
842
{
843
- ByteBuffer serializedMap = getValue (metadata , partitionKey , row );
843
+ ByteBuffer serializedMap = getValue (metadata , partitionKey , row , nowInSec );
844
844
if (serializedMap == null )
845
845
return false ;
846
846
0 commit comments