andygrove opened a new pull request, #324: URL: https://github.com/apache/datafusion-spark/pull/324
## Which issue does this PR close? Part of #56: the "Support `--complete` in the sqllogictest runner to regenerate expected output" item. Builds on #316, which adds the `simplify` and `evaluate` modes. Until #316 merges, this PR also shows its commit. Only the last commit, `test: support --complete in the sqllogictest runner`, is new here. ## Rationale for this change DataFusion's sqllogictest runner has `--complete`, which fills in or rewrites the expected output of a test file from the results of running it. This repository's runner has no such option, so expected results have to be typed by hand. ## What changes are included in this PR? - **`--complete`:** a new flag in `tests/sqllogictests.rs`. For each matching file it calls sqllogictest's `update_test_file`, with the same validators and normalizer as a normal run, and prints `COMPLETED` instead of `PASS`. - **One mode:** completion writes one set of results, so it runs only `simplify` mode, or the mode `--mode=` names. Both modes must give the same results, and a normal run afterwards checks that. - **Skipped records:** records skipped for the mode's label, such as `skipif simplify` or `onlyif spark`, are written back unchanged. - **README:** a "Filling in expected results" section in `test_files/README.md`. It says to review the diff and check the new results against Spark before committing them. ## Are these changes tested? - **No-op round trip:** running `--complete` on all 246 files changes none of them, so completion writes files in the format they're already in. - **New query:** I added `SELECT expm1(1::double)` to `math/expm1.slt` with an empty result. `--complete` filled in `1.718281828459045`, and the file then passed in both modes. That edit is not part of this PR. ## Are there any user-facing changes? No. The runner is a test tool. _This PR was written by an LLM (Claude) and reviewed before opening._ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
