maedhroz commented on code in PR #2916:
URL: https://github.com/apache/cassandra/pull/2916#discussion_r1402627514


##########
src/java/org/apache/cassandra/index/sai/disk/v1/segment/NumericIndexSegmentSearcher.java:
##########
@@ -82,25 +82,25 @@ public long indexFileCacheSize()
     public KeyRangeIterator search(Expression exp, 
AbstractBounds<PartitionPosition> keyRange, QueryContext context) throws 
IOException
     {
         if (logger.isTraceEnabled())
-            logger.trace(indexContext.logMessage("Searching on expression 
'{}'..."), exp);
+            logger.trace(index.identifier().logMessage("Searching on 
expression '{}'..."), exp);
 
-        if (exp.getOp().isEqualityOrRange())
+        if (exp.getIndexOperator().isEqualityOrRange())
         {
             final BlockBalancedTreeReader.IntersectVisitor query = 
balancedTreeQueryFrom(exp, treeReader.getBytesPerValue());
             QueryEventListener.BalancedTreeEventListener listener = 
MulticastQueryEventListeners.of(context, perColumnEventListener);
             return toPrimaryKeyIterator(treeReader.intersect(query, listener, 
context), context);
         }
         else
         {
-            throw new 
IllegalArgumentException(indexContext.logMessage("Unsupported expression during 
index query: " + exp));
+            throw new 
IllegalArgumentException(index.identifier().logMessage("Unsupported expression 
during index query: " + exp));
         }
     }
 
     @Override
     public String toString()
     {
         return MoreObjects.toStringHelper(this)
-                          .add("indexContext", indexContext)
+                          .add("index", index)

Review Comment:
   The output changes slightly here I think, due to SAI's `toString()` 
including the table name. Not sure if that matters. Maybe there's a case for 
just reusing the `IndexIdentifier#toString()` in SAI if we don't care about the 
table name in a non-logging context.



-- 
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]

Reply via email to