Skip to content

Commit

Permalink
partiql-visualize-dot: add (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivr authored Nov 8, 2023
1 parent 6ef3177 commit febf454
Show file tree
Hide file tree
Showing 8 changed files with 934 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Added
- Add `partiql-extension-visualize` for visualizing AST and logical plan

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ members = [
"partiql-types",
"partiql-value",


"extension/partiql-extension-ion",
"extension/partiql-extension-ion-functions",
"extension/partiql-extension-visualize",
]

[profile.dev.build-override]
Expand Down
35 changes: 35 additions & 0 deletions extension/partiql-extension-visualize/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
name = "partiql-extension-visualize"
description = "Visualize PartiQL AST and Logical Plan"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
license = "Apache-2.0"
readme = "../../README.md"
keywords = ["sql", "parser", "query", "compilers", "interpreters"]
categories = ["database", "compilers"]
exclude = [
"**/.git/**",
"**/.github/**",
"**/.travis.yml",
"**/.appveyor.yml",
]
version.workspace = true
edition.workspace = true

[lib]
bench = false

[dependencies]
partiql-ast = { path = "../../partiql-ast", version = "0.6.*" }
partiql-logical = { path = "../../partiql-logical", version = "0.6.*" }

dot-writer = { version = "0.1.*", optional = true }
itertools = { version = "0.10.*", optional = true }

[features]
default = []
visualize-dot = [
"dep:dot-writer",
"dep:itertools",
]
5 changes: 5 additions & 0 deletions extension/partiql-extension-visualize/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# PartiQL Extension Visualize

PoC for visualizing AST and Logical Plan. At the moment, it **only** supports visualizing in DOT format.

It should be considered experimental, subject to change etc.
Loading

1 comment on commit febf454

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartiQL (rust) Benchmark

Benchmark suite Current: febf454 Previous: 6ef3177 Ratio
arith_agg-avg 774930 ns/iter (± 1405) 941419 ns/iter (± 73644) 0.82
arith_agg-avg_distinct 863740 ns/iter (± 2341) 1276486 ns/iter (± 55450) 0.68
arith_agg-count 821089 ns/iter (± 31437) 1264891 ns/iter (± 86620) 0.65
arith_agg-count_distinct 865003 ns/iter (± 3352) 1266475 ns/iter (± 43908) 0.68
arith_agg-min 824792 ns/iter (± 4183) 1249892 ns/iter (± 46994) 0.66
arith_agg-min_distinct 862073 ns/iter (± 3156) 1283726 ns/iter (± 104311) 0.67
arith_agg-max 831647 ns/iter (± 2214) 1262569 ns/iter (± 55099) 0.66
arith_agg-max_distinct 873358 ns/iter (± 5289) 1325749 ns/iter (± 98187) 0.66
arith_agg-sum 824877 ns/iter (± 12048) 1266184 ns/iter (± 60314) 0.65
arith_agg-sum_distinct 862124 ns/iter (± 25791) 1270357 ns/iter (± 63684) 0.68
arith_agg-avg-count-min-max-sum 975755 ns/iter (± 4692) 1505602 ns/iter (± 63925) 0.65
arith_agg-avg-count-min-max-sum-group_by 1283533 ns/iter (± 17156) 1807514 ns/iter (± 68759) 0.71
arith_agg-avg-count-min-max-sum-group_by-group_as 1900087 ns/iter (± 17407) 2791700 ns/iter (± 106288) 0.68
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct 1312139 ns/iter (± 27719) 1763977 ns/iter (± 104833) 0.74
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct-group_by 1668723 ns/iter (± 12031) 2069455 ns/iter (± 65747) 0.81
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct-group_by-group_as 2273825 ns/iter (± 134302) 3011931 ns/iter (± 92495) 0.75
parse-1 4954 ns/iter (± 37) 5885 ns/iter (± 386) 0.84
parse-15 43532 ns/iter (± 91) 48940 ns/iter (± 3352) 0.89
parse-30 85169 ns/iter (± 487) 96015 ns/iter (± 5566) 0.89
compile-1 4378 ns/iter (± 33) 5179 ns/iter (± 215) 0.85
compile-15 32549 ns/iter (± 94) 42074 ns/iter (± 8757) 0.77
compile-30 65733 ns/iter (± 441) 87148 ns/iter (± 2559) 0.75
plan-1 65793 ns/iter (± 321) 96812 ns/iter (± 4347) 0.68
plan-15 1021480 ns/iter (± 10077) 1470510 ns/iter (± 62830) 0.69
plan-30 2041544 ns/iter (± 43822) 2904917 ns/iter (± 113963) 0.70
eval-1 14225792 ns/iter (± 55566) 19178617 ns/iter (± 1710894) 0.74
eval-15 91904584 ns/iter (± 599657) 101956959 ns/iter (± 4930025) 0.90
eval-30 175253146 ns/iter (± 1129796) 197651181 ns/iter (± 6742894) 0.89
join 10587 ns/iter (± 39) 11551 ns/iter (± 497) 0.92
simple 2920 ns/iter (± 94) 3252 ns/iter (± 130) 0.90
simple-no 485 ns/iter (± 6) 529 ns/iter (± 23) 0.92
numbers 48 ns/iter (± 0) 41 ns/iter (± 1) 1.17
parse-simple 646 ns/iter (± 10) 740 ns/iter (± 52) 0.87
parse-ion 2107 ns/iter (± 17) 2293 ns/iter (± 87) 0.92
parse-group 6721 ns/iter (± 17) 7491 ns/iter (± 454) 0.90
parse-complex 17146 ns/iter (± 83) 20031 ns/iter (± 1140) 0.86
parse-complex-fexpr 23904 ns/iter (± 165) 30696 ns/iter (± 1783) 0.78

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.