limbo/testing
Jussi Saurio 306e097950 Merge 'Fix bug: we cant remove order by terms from the head of the list' from Jussi Saurio
we had an incorrect optimization in `eliminate_orderby_like_groupby()`
where it could remove e.g. the first term of the ORDER BY if it matched
the first GROUP BY term and the result set was naturally ordered by that
term. this is invalid. see e.g.:
```sql
main branch - BAD: removes the `ORDER BY id` term because the results are naturally ordered by id.
However, this results in sorting the entire thing by last name only!

limbo> select id, last_name, count(1) from users GROUP BY 1,2 order by id, last_name desc limit 3;
┌──────┬───────────┬───────────┐
│ id   │ last_name │ count (1) │
├──────┼───────────┼───────────┤
│ 6235 │ Zuniga    │         1 │
├──────┼───────────┼───────────┤
│ 8043 │ Zuniga    │         1 │
├──────┼───────────┼───────────┤
│  944 │ Zimmerman │         1 │
└──────┴───────────┴───────────┘

after fix - GOOD:

limbo> select id, last_name, count(1) from users GROUP BY 1,2 order by id, last_name desc limit 3;
┌────┬───────────┬───────────┐
│ id │ last_name │ count (1) │
├────┼───────────┼───────────┤
│  1 │ Foster    │         1 │
├────┼───────────┼───────────┤
│  2 │ Salazar   │         1 │
├────┼───────────┼───────────┤
│  3 │ Perry     │         1 │
└────┴───────────┴───────────┘

I also refactored sorters to always use the ast `SortOrder` instead of boolean vectors, and use the `compare_immutable()` utility we use inside btrees too.

Closes #1365
2025-05-03 12:48:08 +03:00
..
cli_tests Adjustments and explicitely just emitting NoConflict on unique indexes 2025-04-24 13:13:39 -03:00
test_files Fix import csv failing when single quote is in string 2025-01-11 13:48:21 +05:30
wal testing: Add test database + WAL file 2024-08-03 12:16:34 +03:00
agg-functions.test add tests 2025-04-03 22:28:13 +03:00
all.test Fix incompatibility AND Expression 2025-04-13 22:38:43 -03:00
boolean.test Fix incompatibility AND Expression 2025-04-13 22:38:43 -03:00
changes.test Created basic tcl tests for changes and total_changes 2025-01-19 20:51:16 -05:00
cmdlineshell.test refactor(testing): move .table tests to shelltests.py 2024-12-18 09:10:37 +02:00
coalesce.test extend TCL tests for COALESCE 2025-02-09 22:01:33 +04:00
compare.test Add Null comparision tests 2025-01-19 00:39:10 +05:30
concat.test Added Concat Opcode 2025-01-21 00:29:23 +05:30
default_value.test core/translate: Add support for default values in INSERT statements 2025-04-04 01:32:13 -03:00
delete.test Add TCL tests for delete 2025-02-06 23:39:12 +05:30
drop_table.test core: Fix Destroy opcode root page handling 2025-03-24 10:54:49 +02:00
gen-database.py testing: update testing with products table and cross join test 2024-07-09 18:08:16 +02:00
glob.test Fix glob 2024-12-30 17:02:31 +05:30
groupby.test Fix bug: we cant remove order by terms from the head of the list 2025-04-24 10:34:06 +03:00
insert.test fix tests 2025-04-07 20:29:45 +03:00
join.test Fix bug: left join null flag not being cleared 2025-04-19 13:56:52 +03:00
json.test make tests pass 2025-03-30 18:58:38 +03:00
like.test Escape character is ignored in LIKE function #1051 2025-03-01 18:32:09 +01:00
math.test Merge 'Parse hex integers 2' from Anton Harniakou 2025-04-16 11:13:01 +03:00
offset.test Created TCL tests for select queries with offset 2025-01-26 16:40:30 -05:00
orderby.test Add TCL/differential fuzz tests for verifying index scan behavior 2025-04-09 10:14:29 +03:00
pragma.test temporarily comment the pragma-page-count-empty test case 2025-04-26 21:45:18 +08:00
pyproject.toml Adjustments and explicitely just emitting NoConflict on unique indexes 2025-04-24 13:13:39 -03:00
README.md setup uv for limbo 2025-04-15 12:45:46 -03:00
scalar-functions-datetime.test Bump julian_day_converter to 0.4.5 2025-04-14 20:57:54 +08:00
scalar-functions-printf.test test fix 2025-02-04 21:02:51 +05:30
scalar-functions.test correctly handle edge cases 2025-04-11 08:34:29 +05:30
select.test Parse hex integers in unary operators 2025-04-14 21:13:39 +03:00
subquery.test Add failing tests for CTE functionality 2025-02-08 14:49:01 +02:00
tester.tcl Add Ansi Colors to tcl test runner 2025-04-13 23:36:09 -03:00
testing.db index scan wip foo doesnt work yet 2024-10-05 18:25:04 +03:00
testing_norowidalias.db Run all tcl tests on 2 separate dbs (1. with rowid aliases 2. without rowid aliases) 2024-12-14 17:13:45 +02:00
testing_small.db implement is and is not where constraints 2025-01-31 23:01:49 -05:00
testing_small.db-wal implement is and is not where constraints 2025-01-31 23:01:49 -05:00
testing_user_version_10.db Add read implementation of user_version pragma with ReadCookie opcode 2025-02-07 09:23:48 -05:00
time.test extensions/time: normalize offset_sec 2025-02-19 21:25:14 +08:00
total-changes.test Created basic tcl tests for changes and total_changes 2025-01-19 20:51:16 -05:00
transactions.test Implement deferred transactions 2025-03-17 10:01:00 -03:00
update.test Remove update limit tests from compat tcl tests 2025-03-30 12:15:25 -04:00
vector.test testing: Add few TCL tests for vector extensions 2025-01-28 14:24:09 +02:00
where.test Add TCL regression test 2025-04-12 11:13:32 +03:00

Limbo Testing