tledkov-gridgain commented on a change in pull request #9476:
URL: https://github.com/apache/ignite/pull/9476#discussion_r733490716



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
##########
@@ -291,4 +375,36 @@ private void onStop(Service... services) {
                 ((LifecycleAware) service).onStop();
         }
     }
+
+    /** {@inheritDoc} */
+    @Override public Query register(Query qry) {
+        Query old = runningQrys.putIfAbsent(qry.id(), qry);
+
+        return old != null ? old : qry;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Query query(UUID id) {
+        return runningQrys.get(id);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void unregister(UUID id) {
+        runningQrys.remove(id);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<Query> runningQueries() {
+        return runningQrys.values();
+    }
+
+    /** {@inheritDoc} */
+    @Override public RunningQuery runningQuery(UUID id) {

Review comment:
       The CalciteQueryProcessor and QueryRegistry are separated with introduce 
`QueryRegistryImpl`. I guess it partially  solves the ugly code at this place.




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