This is an automated email from the ASF dual-hosted git repository.

doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git


The following commit(s) were added to refs/heads/master by this push:
     new 40019a63 EMPIREDB-396 fix queryRowCount for parameterized aggregate 
queries
40019a63 is described below

commit 40019a635c432251b7dce462402402aa41d8678e
Author: Rainer Döbele <[email protected]>
AuthorDate: Thu Sep 22 12:12:02 2022 +0200

    EMPIREDB-396 fix queryRowCount for parameterized aggregate queries
---
 empire-db/src/main/java/org/apache/empire/db/DBUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/empire-db/src/main/java/org/apache/empire/db/DBUtils.java 
b/empire-db/src/main/java/org/apache/empire/db/DBUtils.java
index 783d7a3d..5b393cd2 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBUtils.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBUtils.java
@@ -482,7 +482,7 @@ public class DBUtils implements DBContextAware
             DBCommand subCmd = cmd.clone();
             subCmd.clearOrderBy();
             String sql = "SELECT COUNT(*) FROM ("+subCmd.getSelect() + ") q";
-            return querySingleInt(sql, null, 0);
+            return querySingleInt(sql, subCmd.getParamValues(), 0);
         }
         // find any rowset
         DBRowSet rs = exprList[0].getSourceColumn().getRowSet();

Reply via email to