Skip to content

Guidance for integrating a progress bar #4668

Answered by joolean
joolean asked this question in Q&A
Discussion options

You must be logged in to vote

I think I've got a sketch of a working approach. Here's the general idea:

  1. ExecutionPlan offers a couple of relevant functions: statistics which provides metrics for the physical plan; and execute, which produces a stream of record batches that constitute the output of the plan.
  2. I've adapted some of the code here: https://github.com/tmpfs/read-progress-stream and created a stream implementation that wraps the record batch stream and invokes a "progress callback"
  3. I've created an alternate implementation of ExecutionPlan that wraps a normal plan and delegates every function except for execute, which I'm hijacking to produce a wrapped progress reader stream.
  4. I'm using the output of statistics

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@joolean
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by joolean
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants