Repository navigation
Fix remaining Web UI review feedback from #110210 - #115103
Conversation
|
Workflow [PR], commit [5f11232] Summary: ✅
AI ReviewSummaryThis PR tightens Web UI handling for inline- Findings
Tests
Final VerdictChanges requested. LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 66/67 (98.51%) · Uncovered code |
Only treat a plain each-row exception object as an HTTP error carrier when it matches the persisted displayed error, preserving partial rows on transport failure replay. #115103
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 3 s compile time in total, 6 of them have a recent master baseline. |
…refix `ParserExplainQuery` hands `EXPLAIN AST ...` to the full `ParserQuery`, so the statement wrapped by a leading `EXPLAIN` can be of any kind. Enumerating the non-`INSERT` statement starters therefore cannot be complete: `EXPLAIN AST DETACH TABLE insert FORMAT TabSeparated` kept scanning past `DETACH`, let the table name `insert` set `saw_insert`, and made `detectExplicitFormatClause` drop the real trailing `FORMAT` clause as if it were inline `INSERT` input. The same gap existed for `ATTACH`, `UNDROP`, `COPY` and every other missing starter. Invert the condition instead: keep walking only while the prefix itself is still unresolved. For a `WITH` prefix nothing is left after the alias skip, so any other bare word resolves the statement; for an `EXPLAIN` prefix only the `EXPLAIN` kind words of `ParserExplainQuery` and its optional settings list can still precede the wrapped statement. An unlisted word now only stops the walk earlier, which is the safe direction. Also fix the new `renderFailedSnapshot` regression in `image_preview_harness.js`: it still used the old five-argument signature, so `plain_http_each_row_error` was `undefined` and the positive case exercised the raw-plus-error replay path rather than the new provenance-based restore. Pass the persisted provenance bit explicitly for both cases, and add fallback tokenizer regressions for the `EXPLAIN` / `WITH`-wrapped non-`INSERT` statements and for `EXPLAIN PLAN header = 1 INSERT ...`.
| } | ||
| /// `ParserInsertQuery` accepts a leading `WITH`; `ParserExplainQuery` can wrap that | ||
| /// insert. Keep scanning those prefixes until their top-level `INSERT`, while returning | ||
| /// as soon as they resolve to a non-insert statement such as `WITH ... SELECT`. |
There was a problem hiding this comment.
Scalar WITH expressions can still hit the fallback return tokens path before the real statement keyword appears. ParserInsertQuery accepts leading CTE elements like toInt32(1) AS x, so a query such as:
WITH toInt32(1) AS x
INSERT INTO FUNCTION null('line String') FORMAT LineAsString
FORMAT JSONCompactColumnsis still a valid inline-INSERT. Here the top-level bare word toInt32 is neither an alias nor insert, so this walk bails out before it ever sees the real INSERT, and detectExplicitFormatClause starts treating the second FORMAT JSONCompactColumns as a real output clause again. The same shape with SETTINGS framing_output_format = 'None' after LineAsString makes detectFramingSetting scan post-format payload as query SQL.
This needs the same kind of leading-WITH walk as statementIsReadOnly: keep skipping ordinary CTE expression tokens until the list resolves to the actual statement keyword, not only the alias positions.
Related: #110210
Fixes three review findings discovered shortly before #110210 merged: recognize inline input following
WITH/EXPLAIN-wrappedINSERT, restore plain each-row JSON HTTP errors exactly as displayed live, and clear stale Download/Copy state when a result pane is reset.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Workflow [PR]
Sync PR [sync-upstream/pr/115103]
Version info
26.8.1.1823(included in26.8and later)