xiaochen-zhou commented on code in PR #4125:
URL: https://github.com/apache/calcite/pull/4125#discussion_r1904809069


##########
core/src/main/java/org/apache/calcite/materialize/MaterializationService.java:
##########
@@ -241,8 +240,7 @@ private MaterializationService() {
     // TODO: Use a partially-ordered set data structure, so we are not scanning
     // through all tiles.
     if (!exact) {
-      final PriorityQueue<Pair<CalciteSchema.TableEntry, TileKey>> queue =
-          new PriorityQueue<>(1, C);
+      Pair<CalciteSchema.TableEntry, TileKey> bestCandidate = null;

Review Comment:
   > can the TODO comment above be deleted?
   
   I don't think it can be deleted yet. The keyByTile data structure needs to 
be changed from a Map to a partially-ordered set data structure to avoid 
scanning through all tiles. Only then can it be removed.
   
![image](https://github.com/user-attachments/assets/4eac0cde-338d-48db-a5c0-7a5f2ced446d)
   
   
   



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

Reply via email to