Skip to content

Commit acc3119

Browse files
julianhydeclaude
andcommitted
[CALCITE-7420] Enable !ok for ~290 tests in Quidem .iq files
Previously, tests using sales-schema tables (e.g., sales.emp) or focusing on plan transformation had comments like: # Not using !ok: query uses the sales schema, which is not in the scott database. # Not using !ok: this test focuses on plan transformation (see !sub-plan). This commit enables !ok for all such tests that are compatible with the scott HSQLDB database, adding the expected query results. Sales-schema references (sales.emp, sales.dept, etc.) are converted to unqualified names (emp, dept, etc.) so they run against the scott catalog. Tests that remain disabled are those using non-scott tables (empnullables, deptnullables, DEPT_NESTED), non-deterministic functions (RAND, RAND_INTEGER, CURRENT_TIMESTAMP), or queries that fail in H2 due to implementation limits (very large LIMIT/OFFSET values, EXCEPT with correlated subqueries, ORDER BY null, SINGLE_VALUE aggregation with multiple rows). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 759c03a commit acc3119

21 files changed

Lines changed: 8846 additions & 507 deletions

core/src/test/resources/sql/rule/aggregate-expand-distinct-aggregates.iq

Lines changed: 387 additions & 25 deletions
Large diffs are not rendered by default.

core/src/test/resources/sql/rule/aggregate-filter.iq

Lines changed: 354 additions & 12 deletions
Large diffs are not rendered by default.

core/src/test/resources/sql/rule/aggregate-join-transpose.iq

Lines changed: 477 additions & 95 deletions
Large diffs are not rendered by default.

core/src/test/resources/sql/rule/aggregate.iq

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,28 @@ LogicalProject(X=[$0], EXPR$1=[$2], Y=[$1])
109109
# AggregateRemoveRule removes a GROUP BY with all-unique keys (DISTINCT on empno,
110110
# deptno where empno is unique), so the Aggregate is eliminated.
111111

112-
select distinct empno, deptno from sales.emp;
113-
# Not using !ok: query uses the sales schema, which is not in the scott database.
112+
select distinct empno, deptno from emp;
113+
+-------+--------+
114+
| EMPNO | DEPTNO |
115+
+-------+--------+
116+
| 7369 | 20 |
117+
| 7499 | 30 |
118+
| 7521 | 30 |
119+
| 7566 | 20 |
120+
| 7654 | 30 |
121+
| 7698 | 30 |
122+
| 7782 | 10 |
123+
| 7788 | 20 |
124+
| 7839 | 10 |
125+
| 7844 | 30 |
126+
| 7876 | 20 |
127+
| 7900 | 30 |
128+
| 7902 | 20 |
129+
| 7934 | 10 |
130+
+-------+--------+
131+
(14 rows)
132+
133+
!ok
114134

115135
LogicalAggregate(group=[{0, 1}])
116136
LogicalProject(EMPNO=[$0], DEPTNO=[$7])

core/src/test/resources/sql/rule/filter-project-transpose.iq

Lines changed: 404 additions & 7 deletions
Large diffs are not rendered by default.

core/src/test/resources/sql/rule/filter-sub-query-to-correlate.iq

Lines changed: 239 additions & 26 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)