Repository navigation
Progress bar: cap at 99% until the query actually finishes - #10
Merged
Merged
Conversation
For remote sources (url/s3), readRows reaches totalRowsToRead well before the download+decompress finishes, so the rows-based percentage jumped to 100% while the query kept running for seconds — looking done but stuck. Cap the displayed percentage at 99% while running; completion is conveyed by the progress line being removed and the result appearing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add a GitHub mark icon (inline SVG) linking to https://github.com/chdb-io/chdb, opening in a new tab. Styled as an .icon-btn next to the theme toggle; the selector was widened from button.icon-btn to .icon-btn so an <a> picks up the same styling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- progressBar uses Math.floor so a capped 99% leaves an empty cell (Math.round(29.7) rendered a full 30-cell bar, making 99% still look "done"). - Repaint the progress line on a 100ms timer, not only on engine ticks. Some queries (e.g. a remote url/s3 download) emit one tick then go quiet, freezing the line; the timer advances a braille spinner at the end so it stays visibly alive. rows/bytes/% keep the last engine values; the rate uses the last tick's elapsed so it doesn't drift. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Some url/s3 reads report totalRowsToRead>0 for a few ticks (bar reaches 99%) then report 0 in later ticks, which made the bar appear and then disappear, leaving only the spinner. Latch the percentage: once a total is known, remember it (non-decreasing, capped at 99%) and keep rendering the bar even when later ticks report no total. Queries that never report a total still show just the spinner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For a remote-source query like
SELECT * FROM s3('…trips_0.gz', NOSIGN, 'TabSeparatedWithNames') LIMIT 10,the progress bar jumped to 100% immediately but the result only appeared ~3s later.
Cause: the bar's percentage is
readRows / totalRowsToRead. For url/s3 the rows are readquickly, but the real time goes into downloading + decompressing the remote file — work the
rows metric doesn't capture. So the bar showed 100% while the query kept running.
Fix: cap the displayed percentage at 99% while the query is running. Actual completion
is signalled by the progress line being removed and the result rendering. The
Elapsedtime was already correct (it's the real download time — not a bug).
🤖 Generated with Claude Code
Note
Cap SQL query progress bar at 99% until query completes and add spinner animation
.icon-btnCSS selector that works on anchor elements in addition to buttons.Macroscope summarized 8cf4079.