Commit Graph

557 Commits

Author SHA1 Message Date
jussisaurio
2e32ca0bdb More structured query planner 2024-08-16 19:42:03 +03:00
Kim Seon Woo
48d3c05fb0 Rebase 2024-08-16 21:40:30 +09:00
Pekka Enberg
c9c0d2808c Merge 'Add support for ifnull scalar function' from Kim Seon Woo
Add support for `ifnull` scalar function

### EXPLAIN SELECT ifnull(null, 20);
![image](https://github.com/user-attachments/assets/e367638f-9d70-4dfc-989d-7290b842c2ec)

### Related issue
https://github.com/penberg/limbo/issues/144

Closes #290
2024-08-16 14:37:08 +03:00
Pekka Enberg
ba3acedbc8 Merge 'Add support for substr scalar function' from Kim Seon Woo
Add support for `substr` scalar function. We can reuse the `substring` logic which is already implemted.

## Related issue
https://github.com/penberg/limbo/issues/144

Closes #289
2024-08-16 14:36:55 +03:00
김선우
8fbcd10e0e Add support for ifnull scalar function 2024-08-16 09:25:04 +09:00
김선우
27d9af2bf4 Add support for substr scalar function 2024-08-16 08:26:42 +09:00
김선우
fe526e118e Nit 2024-08-16 06:43:55 +09:00
김선우
77c3d130f3 Add char function support 2024-08-16 06:26:06 +09:00
Pekka Enberg
39e77bac9f Merge 'Implement scala function substring(...) ' from Kim Seon Woo
Implement scala function `substring(x, y, z)` and `substring(x, y)`

### EXPLAIN SELECT substring('limbo', 3);
![image](https://github.com/user-attachments/assets/0138d802-c40e-4990-8657-05a0d54ee00f)

### EXPLAIN SELECT substring('limbo', 1, 2);
![image](https://github.com/user-attachments/assets/1babeb1b-f5ca-4b8f-ae19-c4f06b51d4b6)

### Related issue
https://github.com/penberg/limbo/issues/144

Closes #286
2024-08-15 19:45:22 +03:00
김선우
ac440495bd Nit 2024-08-15 18:59:46 +09:00
김선우
28bd0275c0 Run cargo fmt, clippy 2024-08-15 18:56:02 +09:00
김선우
dc48c2e71d Add substring scala function with 2 arg 2024-08-15 18:47:32 +09:00
김선우
3fa3c5c002 Add substr scala function 2024-08-15 18:27:18 +09:00
gandeevanr
23a7d389b1 added unit tests for NewRowid 2024-08-08 19:04:10 -07:00
gandeevanr
a9cb8157b5 initial pass at implementing NewRowId 2024-08-07 09:04:09 -07:00
Pekka Enberg
5b7d112e74 Merge 'implementation of json function json(X)' from Jean Arhancet
Add the `json` function `json(X)` (related to the issue https://github.com/penberg/limbo/issues/127)

Closes #230
2024-08-06 08:05:33 +03:00
JeanArhancet
4050a3ebe2 refactor: impl json5 direclty 2024-08-04 12:47:08 +02:00
JeanArhancet
8dbced6a39 refactor: delete Insn Json 2024-08-04 10:56:51 +02:00
JeanArhancet
552090cb29 feat: add json support 2024-08-04 10:54:27 +02:00
sonhmai
0e7bd95e4e core: fix clippy 2024-08-03 20:14:26 +07:00
Pekka Enberg
0affdada2a core: Move datetime.rs to vdbe/
The file contains SQL functions invoked by the VDBE so let's move the
file there.
2024-08-02 17:34:10 +03:00
Pekka Enberg
9c479734be core: Rename to exec_time()
Follow the same naming convention as other SQL functions.
2024-08-02 17:34:10 +03:00
Pekka Enberg
465dfa3cb5 core: Rename to exec_date()
Follow the same naming convention as other SQL functions.
2024-08-02 17:34:10 +03:00
jussisaurio
20c085614f Add ability to annotate instructions with comments 2024-08-01 20:34:45 +03:00
jussisaurio
551b11303f Broaden the type of expr that qualifies as seekrowid candidate 2024-08-01 17:23:59 +03:00
jussisaurio
97dfae437c SeekRowid VM instruction 2024-08-01 17:23:59 +03:00
Pekka Enberg
f8a43361db core: Move pager.rs to storage module 2024-08-01 11:52:50 +03:00
Pekka Enberg
7abc48303f core: Move btree.rs to storage module 2024-08-01 11:52:50 +03:00
Pekka Enberg
73bdf1671f Initial pass on WAL reader
These are mostly just stubs for now, but at least we have some code in
place as reminder what we need.
2024-08-01 11:31:17 +03:00
sonhmai
789ae4becf feat: add time() scalar function partial support without modifier #158 2024-08-01 13:06:07 +07:00
Pere Diaz Bou
20dc068a9d core: don't traverse twice 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
3b9f5aa511 core: implement exists 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
84bf0ea96a core: remove a bunch of warnings
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-31 17:27:02 +02:00
Pere Diaz Bou
7846a3b29c core: fix calculation of record header size varint 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
e6f8b34f2b core: insert_to_page almost complete 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
bbf238a6a4 core/io: save raw buffers on page
necessary for future lazy addressing of values and writes to page data
2024-07-31 17:27:02 +02:00
Pere Diaz Bou
a09f3485f9 core: fix op generation 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
6db82abf63 core: move_to 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
6357e88b46 core: implement vdbe opcodes minus newrowid 2024-07-31 17:25:01 +02:00
Pere Diaz Bou
bbed54d11c core: basic op explain insert 2024-07-31 17:23:16 +02:00
macroexpansion
918b99b7a3 feat: add RTRIM(X) and RTRIM(X,Y) scalar function 2024-07-28 21:17:53 +07:00
macroexpansion
750f18be35 feat: add ltrim scalar function 2024-07-27 19:46:27 +07:00
Pekka Enberg
35dff7ca2c core: Add module-level docs for translate and vdbe
Let's add module-level documentation for the code generator in
`translate` and the virtual machine in `vdbe`, which are two major
subsystems in the database engine that developers work on mostly.
2024-07-26 10:23:47 +03:00
Pekka Enberg
ec6f0224ef Merge pull request #224 from ethanniser/add-unicode 2024-07-25 20:37:39 +03:00
Ethan Niser
aa6531f802 add unicode scalar function 2024-07-25 10:05:41 -07:00
Pekka Enberg
351242561d Kill anyhow usage
Switch anyhow to explicit `LimboError` type using thiserror crate, which
lets us make error handling more structured.
2024-07-25 17:15:08 +03:00
Ethan Niser
07d6ebef24 rename SingleRow -> Scalar 2024-07-24 08:53:47 -07:00
Pekka Enberg
0cb993e152 Merge pull request #204 from jussisaurio/multi-way-join
Refactor join processing / support multiway joins
2024-07-24 11:06:32 +03:00
Pekka Enberg
e3fea5cd92 Merge pull request #208 from jussisaurio/fix-agg-functions-on-text 2024-07-24 00:19:33 +03:00
jussisaurio
cc79ff5cfd Fix #205: agg functions on text columns 2024-07-23 23:18:01 +03:00