oleg-vlsk commented on code in PR #12544:
URL: https://github.com/apache/ignite/pull/12544#discussion_r2579123376


##########
modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlQueryHistorySelfTest.java:
##########
@@ -669,6 +703,21 @@ public static class Functions {
         public static int fail() {
             throw new IgniteSQLException("SQL function fail for test 
purpuses");
         }
+
+        /**
+         *
+         */
+        @QuerySqlFunction
+        public static int sleep_func(int sleep, int val) {
+            try {
+                Thread.sleep(sleep);
+            }
+            catch (InterruptedException ignored) {
+                // No-op
+            }

Review Comment:
   Done.



##########
modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlQueryHistorySelfTest.java:
##########
@@ -253,6 +254,39 @@ public void testSqlFieldsQueryHistoryWithInitiatorId() {
         assertEquals(testId1, history.initiatorId());
     }
 
+    /**
+     * Test total duration of SQL queries.
+     */
+    @Test
+    public void testSqlFieldsQueryTotalDuration() {
+        SqlFieldsQuery qry = new SqlFieldsQuery("select * from A.String where 
_key=sleep_func(?, ?)").setArgs(500, 1);

Review Comment:
   Done.



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