1717 under the License.
1818-->
1919
20- #### Overview
20+ # DataFusion sqllogictest
2121
22- This is the Datafusion implementation of [ sqllogictest] ( https://www.sqlite.org/sqllogictest/doc/trunk/about.wiki ) . We
23- use [ sqllogictest-rs] ( https://github.com/risinglightdb/sqllogictest-rs ) as a parser/runner of ` .slt ` files
24- in [ ` test_files ` ] ( test_files ) .
22+ [ DataFusion] [ df ] is an extensible query execution framework, written in Rust, that uses Apache Arrow as its in-memory format.
2523
26- #### Testing setup
24+ This crate is a submodule of DataFusion that contains an implementation of [ sqllogictest] ( https://www.sqlite.org/sqllogictest/doc/trunk/about.wiki ) .
25+
26+ [ df ] : https://crates.io/crates/datafusion
27+
28+ ## Overview
29+
30+ This crate uses [ sqllogictest-rs] ( https://github.com/risinglightdb/sqllogictest-rs ) to parse and run ` .slt ` files in the
31+ [ ` test_files ` ] ( test_files ) directory of this crate.
32+
33+ ## Testing setup
2734
28351 . ` rustup update stable ` DataFusion uses the latest stable release of rust
29362 . ` git submodule init `
30373 . ` git submodule update `
3138
32- #### Running tests: TLDR Examples
39+ ## Running tests: TLDR Examples
3340
3441``` shell
3542# Run all tests
@@ -56,7 +63,7 @@ cargo test --test sqllogictests -- ddl --complete
5663RUST_LOG=debug cargo test --test sqllogictests -- ddl
5764```
5865
59- #### Cookbook: Adding Tests
66+ ## Cookbook: Adding Tests
6067
61681 . Add queries
6269
@@ -95,11 +102,11 @@ SELECT * from foo;
95102
96103Assuming it looks good, check it in!
97104
98- #### Reference
105+ # Reference
99106
100- #### Running tests: Validation Mode
107+ ## Running tests: Validation Mode
101108
102- In this model , ` sqllogictests ` runs the statements and queries in a ` .slt ` file, comparing the expected output in the
109+ In this mode , ` sqllogictests ` runs the statements and queries in a ` .slt ` file, comparing the expected output in the
103110file to the output produced by that run.
104111
105112For example, to run all tests suites in validation mode
@@ -115,10 +122,10 @@ sqllogictests also supports `cargo test` style substring matches on file names t
115122cargo test --test sqllogictests -- information
116123```
117124
118- #### Running tests: Postgres compatibility
125+ ## Running tests: Postgres compatibility
119126
120127Test files that start with prefix ` pg_compat_ ` verify compatibility
121- with Postgres by running the same script files both with DataFusion and with Posgres
128+ with Postgres by running the same script files both with DataFusion and with Postgres
122129
123130In order to run the sqllogictests running against a previously running Postgres instance, do:
124131
@@ -145,7 +152,7 @@ docker run \
145152 postgres
146153```
147154
148- #### Running Tests: ` tpch `
155+ ## Running Tests: ` tpch `
149156
150157Test files in ` tpch ` directory runs against the ` TPCH ` data set (SF =
1511580.1), which must be generated before running. You can use following
@@ -165,7 +172,7 @@ Then you need to add `INCLUDE_TPCH=true` to run tpch tests:
165172INCLUDE_TPCH=true cargo test --test sqllogictests
166173```
167174
168- #### Updating tests: Completion Mode
175+ ## Updating tests: Completion Mode
169176
170177In test script completion mode, ` sqllogictests ` reads a prototype script and runs the statements and queries against the
171178database engine. The output is a full script that is a copy of the prototype script with result inserted.
@@ -177,7 +184,7 @@ You can update the tests / generate expected output by passing the `--complete`
177184cargo test --test sqllogictests -- ddl --complete
178185```
179186
180- #### Running tests: ` scratchdir `
187+ ## Running tests: ` scratchdir `
181188
182189The DataFusion sqllogictest runner automatically creates a directory
183190named ` test_files/scratch/<filename> ` , creating it if needed and
@@ -190,7 +197,7 @@ Tests that need to write temporary files should write (only) to this
190197directory to ensure they do not interfere with others concurrently
191198running tests.
192199
193- #### ` .slt ` file format
200+ ## ` .slt ` file format
194201
195202[ ` sqllogictest ` ] was originally written for SQLite to verify the
196203correctness of SQL queries against the SQLite engine. The format is designed
@@ -247,7 +254,7 @@ query <type_string> <sort_mode>
247254> :warning : It is encouraged to either apply ` order by ` , or use ` rowsort ` for queries without explicit ` order by `
248255> clauses.
249256
250- ##### Example
257+ ### Example
251258
252259``` sql
253260# group_by_distinct
0 commit comments