Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hansott/datafusion-sqlparser-rs int…
Browse files Browse the repository at this point in the history
…o patch-carriage-return

* 'main' of github.com:hansott/datafusion-sqlparser-rs:
  Add support for MySQL's INSERT INTO ... SET syntax (apache#1641)
  Add support for Snowflake LIST and REMOVE (apache#1639)
  Add support for the SQL OVERLAPS predicate (apache#1638)
  Add support for various Snowflake grantees (apache#1640)
  Add support for USE SECONDARY ROLE (vs. ROLES) (apache#1637)
  Correctly tokenize nested comments (apache#1629)
  Add support for MYSQL's `RENAME TABLE` (apache#1616)
  Test benchmarks and Improve benchmark README.md (apache#1627)
  • Loading branch information
hansott committed Jan 7, 2025
2 parents 1baf58a + 8cfc462 commit 1d9e45d
Show file tree
Hide file tree
Showing 19 changed files with 1,024 additions and 46 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ jobs:
uses: ./.github/actions/setup-builder
- run: cargo clippy --all-targets --all-features -- -D warnings

benchmark-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust Toolchain
uses: ./.github/actions/setup-builder
- run: cd sqlparser_bench && cargo clippy --all-targets --all-features -- -D warnings

compile:
runs-on: ubuntu-latest
steps:
Expand Down
24 changes: 23 additions & 1 deletion sqlparser_bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,26 @@
under the License.
-->

Benchmarks for sqlparser. See [the main README](../README.md) for more information.
Benchmarks for sqlparser. See [the main README](../README.md) for more information.

Note: this is in a separate, non workspace crate to avoid adding a dependency
on `criterion` to the main crate (which complicates testing without std).

# Running Benchmarks

```shell
cargo bench --bench sqlparser_bench
```

# Profiling

Note you can generate a [flamegraph] using the following command:

```shell
cargo flamegraph --bench sqlparser_bench
```

[flamegraph]: https://crates.io/crates/flamegraph

Here is an example flamegraph:
![flamegraph](img/flamegraph.svg)
Loading

0 comments on commit 1d9e45d

Please sign in to comment.