Commit Graph

22 Commits

Author SHA1 Message Date
Pere Diaz Bou
814f68043d filter out sqlite3 executable too 2025-06-17 19:33:23 +02:00
Pere Diaz Bou
63b37ea6f2 re-enable tests that work with indexes 2025-06-17 19:33:23 +02:00
Pere Diaz Bou
9ae4563bcd index_experimental flag to enable index usages
Currently indexes are the bulk of the problem with `UPDATE` and
`DELETE`, while we work on fixing those it makes sense to disable
indexing since they are not stable. We want to try to make everything
else stable before we continue with indexing.
2025-06-17 19:33:23 +02:00
Jussi Saurio
83c509a613 Fix bug: left join null flag not being cleared
In left joins, even if the join condition is not matched, the system
must emit a row for every row of the outer table:

-- this must return t1.count() rows, with NULLs for all columns of t2
SELECT * FROM t1 LEFT JOIN t2 ON FALSE;

Our logic for clearing the null flag was to do it in Next/Prev. However,
this is problematic for a few reasons:

- If the inner table of the left join is using SeekRowid, then Next/Prev
  is never called on its cursor, so the null flag doesn't get cleared.
- If the inner table of the left join is using a non-covering index seek,
  i.e. it iterates its rows using an index, but seeks to the main table
  to fetch data, then Next/Prev is never called on the main table, and the
  main table's null flag doesn't get cleared.

What this results in is NULL values incorrectly being emitted for the
inner table after the first correct NULL row, since the null flag is
correctly set to true, but never cleared.

This PR fixes the issue by clearing the null flag whenever seek() is
invoked on the cursor. Hence, the null flag is now cleared on:

- next()
- prev()
- seek()
2025-04-19 13:56:52 +03:00
Kould
1bf651bd37 chore: rollback using rowid(sqlite3 unsupported) 2025-01-14 22:56:49 +08:00
Kould
5305a9d0fd feat: support keyword rowid 2025-01-14 22:41:40 +08:00
Kacper Madej
9e01c22a5e Handle quoting identifiers properly 2024-12-18 19:45:06 +01:00
jussisaurio
5e9e2dffe9 support TRUE and FALSE in predicates 2024-12-13 22:58:29 +02:00
jussisaurio
7924f9b64d consider all joined tables instead of just previous in natural/using 2024-12-09 17:50:29 +02:00
jussisaurio
4f027035de tests for multiple joins 2024-12-09 17:50:29 +02:00
jussisaurio
81b6605453 support NATURAL JOIN 2024-12-09 17:50:29 +02:00
jussisaurio
bed932c186 Support join USING 2024-12-09 17:50:29 +02:00
jussisaurio
83f8ea1b13 Fix bug with multiway joins and clean up left join implementation 2024-11-30 20:47:48 +02:00
jussisaurio
3a11887122 fixerinos 2024-10-05 18:25:04 +03:00
jussisaurio
2d35641b86 whitespace 2024-08-16 19:42:03 +03:00
jussisaurio
2e32ca0bdb More structured query planner 2024-08-16 19:42:03 +03:00
jussisaurio
551b11303f Broaden the type of expr that qualifies as seekrowid candidate 2024-08-01 17:23:59 +03:00
jussisaurio
700d9ee976 Optimize constant conditions 2024-07-27 15:08:30 +03:00
jussisaurio
1117aeef74 ORDER BY: support nullable sorting columns and qualified identifiers 2024-07-24 15:27:55 +03:00
jussisaurio
84cf4033d5 Refactor join processing
- Make all constraints a list of WhereTerms in a ProcessedWhereClause
- Support multiple joins instead of just one
2024-07-23 15:04:40 +03:00
jussisaurio
70953a4fd0 Left join initial nested loop implementation 2024-07-18 10:55:27 +03:00
Pekka Enberg
04b96a3d6c testing: join.test 2024-07-16 07:20:34 +03:00