Skip to content

Commit 8fa8b68

Browse files
committed
doc/developer: update sqllogictest.md useful tips
1 parent c994bf8 commit 8fa8b68

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

doc/developer/sqllogictest.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,29 @@ CREATE TABLE bar (
7878
* If you use Visual Studio Code, @benesch has made a syntax highlighter for
7979
sqllogictest, which you can find
8080
[here](https://marketplace.visualstudio.com/items?itemName=benesch.sqllogictest).
81-
* If you run `cargo run --bin sqllogictest -- <path_to_test_file>
82-
--rewrite-results`, sqllogictest will automatically replace the expected
83-
results with the actual results. The main time you use this argument is if you
84-
have made an improvement to the query planner and need to update the expected
85-
plan for every `EXPLAIN PLAN` query.
86-
* If you want to debug a sqllogictest run via debugger, use `rust-lldb --
87-
target/debug/sqllogictest <path_to_test_file_to_run>`. Do not use `rust-gdb`
88-
to debug sqllogictest on MacOS because gdb will print a bunch of error
89-
messages and then freeze.
81+
* If you run
82+
```bash
83+
bin/sqllogictest -- --rewrite-results <path_to_test_file>
84+
```
85+
sqllogictest will automatically replace the expected results with the actual
86+
results. The main time you use this argument is if you have made an improvement to
87+
the query planner and need to update the expected plan for every `EXPLAIN` query.
88+
* If you want to debug a sqllogictest run via debugger, use one of the following
89+
90+
```bash
91+
bin/sqllogictest --wrapper 'rust-lldb --' -- <paths_to_test_files_to_run>
92+
(lldb) run
93+
(lldb) bt
94+
95+
bin/sqllogictest --wrapper 'rust-gdb --args' -- <paths_to_test_files_to_run>
96+
(gdb) run
97+
(gdb) bt
98+
```
99+
See [GDB to LLDB command map](https://lldb.llvm.org/use/map.html) for more
100+
details. *Note*:
101+
102+
Do not use `rust-gdb` to debug sqllogictest on MacOS because `gdb` will print
103+
a bunch of error messages and then freeze.
90104

91105
## Materialize-specific behavior in sqllogictest
92106

0 commit comments

Comments
 (0)