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

gortiz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new f8d2c697e37 Improve BenchmarkOrderByQueries (#16764)
f8d2c697e37 is described below

commit f8d2c697e374340fa69f68244b1f323f16fa13b0
Author: Gonzalo Ortiz Jaureguizar <[email protected]>
AuthorDate: Mon Sep 8 09:46:53 2025 +0200

    Improve BenchmarkOrderByQueries (#16764)
---
 .../apache/pinot/perf/BenchmarkOrderByQueries.java | 52 ++++++++++------------
 1 file changed, 24 insertions(+), 28 deletions(-)

diff --git 
a/pinot-perf/src/main/java/org/apache/pinot/perf/BenchmarkOrderByQueries.java 
b/pinot-perf/src/main/java/org/apache/pinot/perf/BenchmarkOrderByQueries.java
index 22e1edb0fce..41ca58636c6 100644
--- 
a/pinot-perf/src/main/java/org/apache/pinot/perf/BenchmarkOrderByQueries.java
+++ 
b/pinot-perf/src/main/java/org/apache/pinot/perf/BenchmarkOrderByQueries.java
@@ -115,14 +115,16 @@ public class BenchmarkOrderByQueries extends 
BaseQueriesTest {
       .addSingleValueDimension(LOW_CARDINALITY_STRING_COL, 
FieldSpec.DataType.STRING)
       .build();
 
+  @Param({"true", "false"})
+  private boolean _zasc; // called zasc just to force this parameter to be the 
last used in the report
   @Param("1500000")
   private int _numRows;
-  @Param({"naive", "null"})
-  private String _orderByAlgorithm;
-  @Param({"EXP(0.5)"})
-  String _scenario;
+  //@Param({"EXP(0.5)"})
+  String _scenario = "EXP(0.5)";
   @Param({"1", "1000"})
   int _primaryRepetitions;
+  @Param({"1500", "150000"})
+  int _limit;
   private IndexSegment _indexSegment;
   private List<IndexSegment> _indexSegments;
   private LongSupplier _supplier;
@@ -194,42 +196,36 @@ public class BenchmarkOrderByQueries extends 
BaseQueriesTest {
   }
 
   @Benchmark
-  public BrokerResponseNative sortedAsc() {
+  public BrokerResponseNative sortedTotally() {
+    if (_zasc) {
     return getBrokerResponse(
         "SELECT SORTED_COL "
-            + "FROM MyTable "
+              + "FROM MyTable "
             + "ORDER BY SORTED_COL ASC "
-            + "LIMIT 1052 "
-            + "option(orderByAlgorithm=" + _orderByAlgorithm + ")");
-  }
-  @Benchmark
-  public BrokerResponseNative sortedAscPartially() {
+              + "LIMIT " + _limit);
+    } else {
     return getBrokerResponse(
         "SELECT SORTED_COL "
-            + "FROM MyTable "
-            + "ORDER BY SORTED_COL ASC, LOW_CARDINALITY_STRING_COL "
-            + "LIMIT 1052 "
-            + "option(orderByAlgorithm=" + _orderByAlgorithm + ")");
+              + "FROM MyTable "
+              + "ORDER BY SORTED_COL DESC "
+              + "LIMIT " + _limit);
+    }
   }
-
   @Benchmark
-  public BrokerResponseNative sortedDesc() {
+  public BrokerResponseNative sortedPartially() {
+    if (_zasc) {
     return getBrokerResponse(
         "SELECT SORTED_COL "
-            + "FROM MyTable "
-            + "ORDER BY SORTED_COL DESC "
-            + "LIMIT 1052 "
-            + "option(orderByAlgorithm=" + _orderByAlgorithm + ")");
-  }
-
-  @Benchmark
-  public BrokerResponseNative sortedDescPartially() {
+              + "FROM MyTable "
+              + "ORDER BY SORTED_COL ASC, LOW_CARDINALITY_STRING_COL "
+              + "LIMIT " + _limit);
+    } else {
     return getBrokerResponse(
         "SELECT SORTED_COL "
-            + "FROM MyTable "
+              + "FROM MyTable "
             + "ORDER BY SORTED_COL DESC, LOW_CARDINALITY_STRING_COL "
-            + "LIMIT 1052 "
-            + "option(orderByAlgorithm=" + _orderByAlgorithm + ")");
+              + "LIMIT " + _limit);
+    }
   }
 
   @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to