Repository navigation
fix(schema): fix format mismatch in getObjectMetadata and getServerStats scalar queries - #68
Merged
ZhuchkaTriplesix merged 1 commit intoSep 28, 2026
Conversation
…ats scalar queries handle_get_server_stats and handle_get_object_metadata requested SELECT version(), SELECT uptime() and SHOW CREATE TABLE with FORMAT JSONCompactEachRow (a single data line, no headers), then parsed the response with parse_compact_output, which unconditionally expects FORMAT JSONCompactEachRowWithNamesAndTypes (names line + types line + data lines). Against a real ClickHouse server this always failed to parse, silently falling back to "ClickHouse"/0/"" defaults. Switch all three queries to FORMAT JSONCompactEachRowWithNamesAndTypes so parse_compact_output can read them, and update the version/uptime network-error fallbacks to the same shape. Closes #57
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.
Summary
handle_get_server_stats(SELECT version(),SELECT uptime()) andhandle_get_object_metadata(SHOW CREATE TABLE) requestedFORMAT JSONCompactEachRow, but were parsed withparse_compact_output, which requiresFORMAT JSONCompactEachRowWithNamesAndTypes(names line + types line + data). Against a real server this always failed to parse, silently falling back to"ClickHouse"version,0uptime, and empty DDL.FORMAT JSONCompactEachRowWithNamesAndTypesand updated the version/uptime network-error fallback strings to match the same 3-line shape.test_parse_compact_output_scalar_row) covering single-scalar-row parsing.Closes #57