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

xudong963 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b9b2fc3e0 fix: add missing row count limits to TPC-H queries (#16230)
8b9b2fc3e0 is described below

commit 8b9b2fc3e0226ca6178a784b5f4ccff7b6af4bce
Author: Alexander Droste <alexander.dro...@protonmail.com>
AuthorDate: Tue Jun 3 05:37:17 2025 +0100

    fix: add missing row count limits to TPC-H queries (#16230)
    
    For queries 2,3,10,18 and 21 the TPC-H spec defines a row count limit.
    
    ```
    2.1.2.9 Queries 2, 3, 10, 18 and 21 require that a given number of rows are 
to be returned (e.g., “Return the first 10 selected
    rows”). If N is the number of rows to be returned, the query must return 
exactly the first N rows unless fewer than N
    rows qualify, in which case all rows must be returned. There are three 
permissible ways of satisfying this
    requirement. A test sponsor must select any one of them and use it 
consistently for all the queries that require that a
    specified number of rows be returned.
    ```
    
    https://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v2.17.1.pdf
---
 benchmarks/queries/q10.sql | 3 ++-
 benchmarks/queries/q18.sql | 3 ++-
 benchmarks/queries/q2.sql  | 3 ++-
 benchmarks/queries/q21.sql | 3 ++-
 benchmarks/queries/q3.sql  | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/benchmarks/queries/q10.sql b/benchmarks/queries/q10.sql
index cf45e43485..8613fd4962 100644
--- a/benchmarks/queries/q10.sql
+++ b/benchmarks/queries/q10.sql
@@ -28,4 +28,5 @@ group by
     c_address,
     c_comment
 order by
-    revenue desc;
\ No newline at end of file
+    revenue desc
+limit 20;
diff --git a/benchmarks/queries/q18.sql b/benchmarks/queries/q18.sql
index 835de28a57..ba7ee7f716 100644
--- a/benchmarks/queries/q18.sql
+++ b/benchmarks/queries/q18.sql
@@ -29,4 +29,5 @@ group by
     o_totalprice
 order by
     o_totalprice desc,
-    o_orderdate;
\ No newline at end of file
+    o_orderdate
+limit 100;
diff --git a/benchmarks/queries/q2.sql b/benchmarks/queries/q2.sql
index f66af21020..68e478f65d 100644
--- a/benchmarks/queries/q2.sql
+++ b/benchmarks/queries/q2.sql
@@ -40,4 +40,5 @@ order by
     s_acctbal desc,
     n_name,
     s_name,
-    p_partkey;
\ No newline at end of file
+    p_partkey
+limit 100;
diff --git a/benchmarks/queries/q21.sql b/benchmarks/queries/q21.sql
index 9d2fe32cee..b95e7b0dfc 100644
--- a/benchmarks/queries/q21.sql
+++ b/benchmarks/queries/q21.sql
@@ -36,4 +36,5 @@ group by
     s_name
 order by
     numwait desc,
-    s_name;
\ No newline at end of file
+    s_name
+limit 100;
diff --git a/benchmarks/queries/q3.sql b/benchmarks/queries/q3.sql
index 7dbc6d9ef6..e5fa9e3866 100644
--- a/benchmarks/queries/q3.sql
+++ b/benchmarks/queries/q3.sql
@@ -19,4 +19,5 @@ group by
     o_shippriority
 order by
     revenue desc,
-    o_orderdate;
\ No newline at end of file
+    o_orderdate
+limit 10;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org
For additional commands, e-mail: commits-h...@datafusion.apache.org

Reply via email to