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


##########
src/java/org/apache/cassandra/index/sai/plan/QueryController.java:
##########
@@ -171,6 +175,39 @@ public UnfilteredRowIterator queryStorage(List<PrimaryKey> 
keys, ReadExecutionCo
         return partition.queryMemtableAndDisk(cfs, executionController);
     }
 
+    /**
+     * Get an iterator over the rows for this partition key. Restrict the 
search to the specified view.
+     * @param key
+     * @param executionController
+     * @return
+     */
+    public UnfilteredRowIterator queryStorage(PrimaryKey key, 
ColumnFamilyStore.ViewFragment view, ReadExecutionController 
executionController)
+    {
+        if (key == null)
+            throw new IllegalArgumentException("non-null key required");
+
+        // TODO how do we want to handle static rows?
+        SinglePartitionReadCommand partition = 
SinglePartitionReadCommand.create(cfs.metadata(),
+                                                                               
  command.nowInSec(),
+                                                                               
  command.columnFilter(),
+                                                                               
  RowFilter.none(),
+                                                                               
  DataLimits.NONE,
+                                                                               
  key.partitionKey(),
+                                                                               
  makeFilter(List.of(key)));
+
+        // Class to transform the row to include its source table.
+        Function<Object, Transformation<BaseRowIterator<?>>> rowTransformer = 
(Object sourceTable) -> new Transformation<>()

Review Comment:
   I'm not sure how intelligent the compiler will be about extracting the 
`Transformation`. I guess we could make sure that's not an issue by just 
creating a constant and reusing it to avoid allocations?



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