Pekka Enberg
1c9eaa3d95
Merge 'Restrict joins to max 63 tables and allow arbitrary number of table columns' from Jussi Saurio
...
Closes #2076
Closes #2075
Closes #3705
2025-10-13 18:23:11 +03:00
Pavan-Nambi
6b3fcfd3d4
explicit column aliase must have preference
2025-10-13 19:11:55 +05:30
Pavan-Nambi
57a06835bf
add test and fmt and clippy
...
i was stupid
remove comment
2025-10-13 18:07:51 +05:30
Jussi Saurio
c54e150a52
Merge 'Fix: Table entry is not removed from sqlite_schema when a table is dropped' from
...
Fixes #3682 .
Ignore case of table name when dropping table.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #3683
2025-10-13 15:02:29 +03:00
Jussi Saurio
3669437482
Add vibecoded tests for ColumnUsedMask
2025-10-13 14:03:34 +03:00
Jussi Saurio
e055ed9a8d
Allow arbitrarily many columns in a table
...
Use roaring bitmaps because ColumnUsedMask is likely to be
sparsely populated.
2025-10-13 13:30:26 +03:00
Jussi Saurio
59a1c2ae2e
Disallow joining more than 63 tables
...
Returns an error instead of panicing
2025-10-13 13:30:03 +03:00
Pekka Enberg
77492641db
Merge 'Move all checksum tests behind the feature flag' from Avinash Sajjanshetty
...
Closes #3704
2025-10-13 11:46:56 +03:00
Avinash Sajjanshetty
4a29694475
rename checksums tests appropriately
2025-10-13 13:48:07 +05:30
Avinash Sajjanshetty
ee479d2e52
Move all checksum tests behind the feature flag
2025-10-13 13:47:25 +05:30
Jussi Saurio
523b155df1
Fix another "should have been rewritten" translation panic
...
Closes #2158
2025-10-13 11:02:42 +03:00
Pekka Enberg
2a02cafc73
core/vdbe: Improve IdxDelete error messages with context
...
We currently return the exact same error from two different IdxDelete
paths. Improve the messages with context about what we're doing to make
this error more debuggable.
2025-10-13 09:42:04 +03:00
rajajisai
f703cc7fa7
Remove function
2025-10-12 22:46:41 -04:00
rajajisai
cd763ce373
Fix evalauting expression for limit and offset.
2025-10-12 22:46:25 -04:00
Pavan-Nambi
90615239a0
use update flag conditionally before incrementing changes
2025-10-12 23:02:21 +05:30
Pavan-Nambi
e1f23aeb2c
fmt and add tests
2025-10-12 22:23:04 +05:30
Pavan-Nambi
3491e1f42e
add if alais and allow iff to have more arguments
2025-10-12 22:17:35 +05:30
Pekka Enberg
7221f79a2f
Merge 'Stop ignoring table's max value incase of a manual update in autoincrement.' from Pavan Nambi
...
closes https://github.com/tursodatabase/turso/issues/3664
Reviewed-by: Preston Thorpe <preston@turso.tech >
Closes #3668
2025-10-12 18:38:13 +03:00
Pavan-Nambi
7e8dabaee5
make comparison case sensitive
2025-10-12 18:02:03 +05:30
Pavan-Nambi
36bf88119f
add tests
...
clippy
expect err to make clippy happy
cleanup
2025-10-12 16:38:12 +05:30
Pavan-Nambi
c59b0ffa65
fix(core/vdbe):pass largest value from table to op_new_rowid
2025-10-12 15:57:29 +05:30
rajajisai
6c082660ca
convert table name to lower case
2025-10-11 21:39:41 -04:00
Pavan-Nambi
88d5ee0cf1
names shall not be shared between tables,index,vtabs,views
2025-10-12 05:45:59 +05:30
Pavan-Nambi
ae00542755
get em aliases shall they be used
2025-10-12 05:25:22 +05:30
ultraman
5153e2aa32
Fix disallow reserved prefixes in ALTER TABLE RENAME TO
2025-10-11 16:30:25 +08:00
Pekka Enberg
4af61d8049
Merge 'core/btree: try to introduce trait for cursors' from Pere Diaz Bou
...
I've added a trait called `CursorTrait`. I know it's not a good name for
now, but I didn't know what tto change then enum `Cursor` to. This trait
wraps all common functionality, and some functionality that is yet too
specific that needs to be fixed.
This is needed in order to have layered cursors where for example,
MvccCursor will need a fallback BTreeCursor.
Closes #3660
2025-10-10 19:25:39 +03:00
Pere Diaz Bou
160a84250e
core: add CursorTrait imports where needed
2025-10-10 15:04:15 +02:00
Pere Diaz Bou
b3ab51d66a
core/vdbe: store cursor as a dyn CursorTrait
2025-10-10 15:04:15 +02:00
Pere Diaz Bou
d0d6db301b
core/btree: CursorTrait
2025-10-10 15:04:15 +02:00
Jussi Saurio
7725f336b8
Merge 'Fix incorrectly using an equality constraint twice for index seek' from Jussi Saurio
...
Prevents something like `WHERE x = 5 AND x = 5` from becoming a two
component index key.
Closes #3656
Reviewed-by: Nikita Sivukhin (@sivukhin)
Closes #3658
2025-10-10 13:33:43 +03:00
Jussi Saurio
74e04634aa
Fix incorrectly using an equality constraint twice for index seek
...
Prevents something like `WHERE x = 5 AND x = 5` from becoming a two
component index key.
Closes #3656
2025-10-10 13:19:19 +03:00
Pekka Enberg
e727b8e0dc
Merge 'Vector improvements' from Nikita Sivukhin
...
This PR introduces sparse vectors support and jaccard distance
implementation.
Also, this PR restructure the code to have all vector operations in
separate files (they grow pretty quickly as new vector representations
added to the DB).
Closes #3647
2025-10-10 13:08:46 +03:00
Pekka Enberg
77924c6c71
Merge 'Optimize sorter' from Jussi Saurio
...
Various little fixes to `Sorter` that reduce unnecessary work.
Makes TPC-H query 1 roughly 2x faster, which is a lot because it
originally took 30-40 seconds depending on the CI run
Closes #3645
2025-10-10 13:06:53 +03:00
Pekka Enberg
cf22819817
Merge 'Make sqlite_version() compatible with SQLite' from Glauber Costa
...
I found an application in the open that expects sqlite_version() to
return a specific string (higher than 3.8...).
We had tons of those issues at Scylla, and the lesson was that you tell
your kids not to lie, but when life hits, well... you lie.
We'll add a new function, turso_version, that tells the truth.
Closes #3635
2025-10-10 13:06:36 +03:00
Nikita Sivukhin
51122d3e9c
fix clippy
2025-10-10 11:39:06 +04:00
Nikita Sivukhin
7e727d07af
fix bugs add tests
2025-10-09 23:23:16 +04:00
Nikita Sivukhin
10c51c8da0
add test for convert operation
2025-10-09 22:14:38 +04:00
Nikita Sivukhin
e18f26a1f1
fix bug after refactoring
2025-10-09 21:28:46 +04:00
Nikita Sivukhin
ac9a25a417
fix clippy
2025-10-09 21:19:35 +04:00
Nikita Sivukhin
5336801574
add jaccard distance
2025-10-09 21:15:39 +04:00
Nikita Sivukhin
585d11b736
implement operations for sparse vectors
2025-10-09 20:52:58 +04:00
Jussi Saurio
edf40cc65b
clippy
2025-10-09 19:00:40 +03:00
Jussi Saurio
27a88b86dc
Reuse a single RecordCursor per PseudoCursor
2025-10-09 18:56:49 +03:00
Jussi Saurio
812709cf8e
inline collation comparison functions
2025-10-09 18:56:49 +03:00
Nikita Sivukhin
84643dc4f2
implement sparse vector operations
2025-10-09 19:19:33 +04:00
Diego Reis
d2d265a06f
Small nits and code clean ups
2025-10-09 12:14:20 -03:00
Diego Reis
b8f8a87007
Refactor bytecode emission
...
- we were redundantly translating tmp
- Make emit_constant_insn a method of ProgramBuilder
2025-10-09 11:57:16 -03:00
Diego Reis
84e8d11764
Fix bug when jump_if_true is enabled
2025-10-09 11:57:16 -03:00
Diego Reis
625403cc2a
Fix register reuse when called inside a coroutine
...
- On each interaction we assume that the value is NULL, so we need to
set it like so for every interaction in the list. So we force to not
emit this NULL as constant;
- Forces a copy so IN expressions works inside an aggregation
expression. Not ideal but it works, we should work more on the query
planner for sure.
2025-10-09 11:57:16 -03:00
Diego Reis
da323fa0c4
Some clean ups and correctly working on WHERE clauses
2025-10-09 11:57:15 -03:00