Surface bound parameters, and make expired-result recovery real - #22
Merged
Conversation
…recovery real GenieQuery.Parameters was read off the wire and then dropped before any renderer saw it, so every output mode showed a statement with placeholders and never what it actually ran with — half the value of showing the SQL. JSON now reports them under query.parameters, omitted entirely rather than emitted as an empty array when there were none, since absent is the honest encoding of "not applicable". The terminal and Markdown renderers still omit them, and limitations.md now says so instead of leaving a reader to notice. ReExecuteQueryAsync documented itself as the recovery for QUERY_RESULT_EXPIRED, and nothing called it — the recovery flow did not exist end to end. `export last` now uses it when the cached result has aged out. That costs warehouse time, which is the right trade there specifically: the user asked to export the rows. `ask` still does not re-run on their behalf, because nobody asked it to spend money. 149 tests.
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.
Two findings from the review panel, both cases of code that existed but never reached a user.
GenieQuery.Parameterswas captured and dropped. Read off the wire inNormalize, then never rendered — so every output mode showed SQL with placeholders and never the values it actually ran with, which is half the point of showing the SQL.--format jsonnow reports them underquery.parameters, omitted rather than emitted as an empty array when there were none. Terminal and Markdown still omit them anddocs/limitations.mdnow says so.ReExecuteQueryAsyncdocumented itself as theQUERY_RESULT_EXPIREDrecovery and nothing called it — the flow did not exist end to end.export lastnow uses it when the cached result has aged out. That spends warehouse time, which is right there because the user explicitly asked for the rows;askstill refuses to re-run on their behalf.149 tests.