You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
execution_plans: add metrics collector and re-writer (#144)
* protobuf: move StageKey to protobuf module
The StageKey will be used by various modules due to metrics collection for EXPLAIN ANALYZE. It will be more organized to import from the protobuf module than flight_service, which is its old module.
* test_utils: add in memory channel resolver
This change copies the in-memory channel resolver from the `examples` folder to `test_utils`
so it is possible to execute distributed queries easily in unit tests without the overhead
of network communication.
* test_utils: add utility to create test parquet tables from RecordBatch
This change adds a module `session_context` to `test_utils` which allows you to
- create temp parquet files from RecordBatch
- register this data in the `SessionContext` under a table name
This is handy for unit tests where you typically want to execute a distributed SQL
query on some small hard-coded `RecordBatch` data
* execution_plans: add metrics collector and re-writer
This change introduces new structs / concepts:
1. MetricsCollector
Collects metrics from an instance of `StageExec` (which is a task) using a
pre-order traversal. It stops at any `ArrowFlightReadExec` nodes and collects
child task metrics from them, if there are any.
2. MetricsWrapperExec
A new `ExecutionPlan` node which cannot be executed. It wraps a "real" `ExecutionPlan`
node and stores metrics. This let's you "override" the `metrics()` method on
`ExecutionPlan` nodes. This override applies when displaying the plan as well.
This struct is private.
3. Task MetricsRewriter
Rewrites a task by wrapping each node in a `MetricsWrapperExec`.
Informs #123.
* misc: remove println in test
* misc: fix lint in StageExec
0 commit comments