Skip to content

Fix various trino query things - #355

Merged
Bohreromir merged 11 commits into
mainfrom
fix-trino-query-length-display
Oct 23, 2026
Merged

Bohreromir merged 11 commits into
mainfrom
fix-trino-query-length-display

Conversation

@Bohreromir

Copy link
Copy Markdown
Member

All in seperate commits, I hope its readable that way

Fixes:

  • querytimer display to fall back to ms instead of showing 0s
  • Wrongly flagged exactly MAX_CLIENT_ROWS
  • the query button opening the dropdown
  • Layout shifts when running a query

Also reports the case of being over the row limit to the user

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 64.79% 8691 / 13413
🔵 Statements 63.9% 11692 / 18297
🔵 Functions 66.16% 2783 / 4206
🔵 Branches 54.98% 4990 / 9076
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/components/trino/StatementResult.svelte 0% 0% 0% 0% 24-260
src/lib/server/trino/queries.ts 100% 94.44% 100% 100%
src/lib/server/trino/result-collector.ts 77.08% 67.85% 100% 82.22% 24, 30-36, 39, 44, 86
src/lib/types/query.ts 100% 100% 100% 100%
src/routes/(app)/trino/+page.svelte 0% 0% 0% 0% 410-888
src/routes/(app)/trino/query-runner.svelte.ts 0% 0% 0% 0% 35-327
Generated in workflow #1132 for commit b25fd7f by the Vitest Coverage Report Action

@Bohreromir Bohreromir changed the title Fix trino query length display Fix various trino query things Oct 6, 2026
@Bohreromir
Bohreromir marked this pull request as ready for review October 6, 2026 16:58
Comment thread e2e/support/start-mock-trino.ts Outdated
…h-display

# Conflicts:
#	src/lib/components/trino/StatementResult.svelte
#	src/lib/server/trino/result-collector.test.ts
#	src/lib/server/trino/result-collector.ts
@Bohreromir Bohreromir moved this from Development: Waiting for Review to Development: Done in Stackable Engineering Oct 14, 2026
@Bohreromir Bohreromir moved this from Development: Done to Development: Waiting for Review in Stackable Engineering Oct 14, 2026
@Bohreromir
Bohreromir force-pushed the fix-trino-query-length-display branch from 88d3ffc to 835f8fa Compare October 14, 2026 12:27
…h-display

# Conflicts:
#	src/lib/components/trino/StatementResult.svelte
#	src/routes/(app)/trino/+page.svelte
Comment thread messages/de.json Outdated
Comment thread src/lib/server/trino/result-collector.ts Outdated
@lfrancke lfrancke moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 20, 2026
Trino can return a nextUri on the page that completes a result of
exactly MAX_CLIENT_ROWS (e.g. `LIMIT 10000`), even when FINISHED, so
that did not reliably indicate truncation. Keep polling until a row
beyond the limit actually arrives, and keep rows already received
instead of truncating them.
@Bohreromir
Bohreromir requested a review from lfrancke October 22, 2026 07:37

@lfrancke lfrancke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll leave it up to you.
So the check is correct now, but I believe we now show more rows to the user, righ? Potentially that is.

Let's say that last page brings me over the limit of 10000 then the UI will still show the warning that row limit is exceeded and something about 10k when we could display 11k or so.

@Bohreromir

Copy link
Copy Markdown
Member Author

Yes exactly. We only know if the query actually exceeds our max size by querying it, I thought its pointless to not show it to the user if we already got the data. Only querying further is stopped now.

@Bohreromir
Bohreromir enabled auto-merge October 23, 2026 10:50
@Bohreromir
Bohreromir added this pull request to the merge queue Oct 23, 2026
@Bohreromir Bohreromir moved this from Development: In Review to Development: Done in Stackable Engineering Oct 23, 2026
Merged via the queue into main with commit 6b48591 Oct 23, 2026
12 checks passed
@Bohreromir
Bohreromir deleted the fix-trino-query-length-display branch October 23, 2026 11:14
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants