Skip to content

Conversation

@eadgbear
Copy link
Contributor

These tests are built using insta, a crate for snapshot testing.

For each query in the queries file, the query is:

  • Parsed into an AST
  • Turned into a Logical Plan
  • Executed

The resulting snapshot is the results of each of those steps. The results are not validated, just that the query runs. These tests will tell us if we can parse certain Snowflake syntax and execute it.

To run these tests, simply run cargo test in the runtime crate. Then use cargo insta review to go over the diffs of the results. Not all the queries are deterministic yet so there may be some changes each time the tests are run.

@rampage644
Copy link
Contributor

@slyons Planning to merge?

@eadgbear eadgbear merged commit 64329f0 into main Jan 22, 2025
5 checks passed
@eadgbear eadgbear deleted the slyons/insta_tests branch January 22, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants