xudong963 commented on code in PR #4665: URL: https://github.com/apache/arrow-datafusion/pull/4665#discussion_r1054270516
########## datafusion/core/tests/sqllogictests/README.md: ########## @@ -21,7 +21,11 @@ This is the Datafusion implementation of [sqllogictest](https://www.sqlite.org/sqllogictest/doc/trunk/about.wiki). We use [sqllogictest-rs](https://github.com/risinglightdb/sqllogictest-rs) as a parser/runner of `.slt` files in `test_files`. -#### Running tests +#### Running tests: Validation Mode + +In this model, `sqllogictests` runs the statements and queries in a `.slt` file, comparing the expected output in the fule to the output produced by that run. Review Comment: ```suggestion In this model, `sqllogictests` runs the statements and queries in a `.slt` file, comparing the expected output in the file to the output produced by that run. ``` ########## datafusion/core/tests/sqllogictests/README.md: ########## @@ -40,6 +44,17 @@ Run only the tests in `information_schema.slt`: cargo test -p datafusion --test sqllogictests -- information ``` +#### Updating tests: Completion Mode + +In test script completion mode, `sqllogictests` reads a prototype script and runs the statements and queries against the database engine. The output is is a full script that is a copy of the prototype script with result inserted. + +You can update tests by passing the `--complete` argument. + +```shell +# Update ddl.slt with output from running +cargo test -p datafusion --test sqllogictests -- ddl Review Comment: ```suggestion cargo test -p datafusion --test sqllogictests -- ddl --complete ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
