[PYF-260] Add flink statement result list command and display results on create --wait#3261
Merged
Zander Matheson (awmatheson) merged 3 commits intoconfluentinc:mainfrom Mar 20, 2026
Merged
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
963aca0 to
129c2f4
Compare
… on create --wait
129c2f4 to
4a3a6bc
Compare
- Add truncation warning on create --wait when results hit 100-row cap - Fix timeout inconsistency: align result list --wait to 1 minute - Handle serialized output (-o json/yaml) for no-results DDL statements - Add --max-rows negative value validation - Add unit tests for printStatementResults, fetchAllResults, fieldToString, and extractResultPageToken
Contributor
Author
|
Cynthia Qin (@cqin-confluent) thank you for the feedback, I believe it should all be addressed now. I also added some tests for the behavior (like max rows negative). |
Member
|
Looking forward to see this in prod :) |
Member
Cynthia Qin (cqin-confluent)
left a comment
There was a problem hiding this comment.
Looks good to me, left one nit comment
Co-authored-by: Cynthia Qin <cqin@confluent.io>
Cynthia Qin (cqin-confluent)
approved these changes
Mar 20, 2026
c23bf7b
into
confluentinc:main
1 check passed
13 tasks
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
confluent flink statement result list <statement-name>command that fetches and displays SQL statement result rows from the Flink Gateway API--output human/json/yaml,--wait, and--max-rowsflagsconfluent flink statement create --waitto automatically fetch and display results for bounded queries (e.g.SHOW DATABASES), falling through to existing metadata output for DDL statements and unbounded queriesTest plan
go build ./...compiles successfullyTestFlinkStatementResultListintegration tests pass (human, JSON, YAML, failed, pending, no-results, unbounded)TestFlinkStatementCreatetests pass (including--wait)TestFlinkStatementtests pass (2 pre-existing failures unrelated to this change)SHOW DATABASES,SHOW TABLES, DDL, JSON/YAML output,--max-rowstruncationTest & Review
Integration tests cover 7 scenarios:
--waitManual testing performed against live Confluent Cloud with
SHOW DATABASES,SHOW TABLES,CREATE TABLE(DDL), and streamingSELECTqueries.Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Adds non-interactive result fetching for bounded Flink SQL statements. This enables scripting and automation use cases like listing catalogs, databases, and tables via Flink SQL from the command line, which were previously only possible through the interactive Flink shell (REPL).
Key design decisions:
traits.GetIsBounded()from the Flink Gateway API to distinguish bounded (snapshot) queries from unbounded (streaming) queries--max-rows(default 100)result listreturns an error;create --waitfalls through to metadata outputresultsub-command registered only for cloud login (on-prem can be added later with a separate child command)Blast Radius
flink statement result list) with no changes to existing command behaviorflink statement create --wait, which now additionally displays results for bounded queries instead of only showing metadata. Unbounded queries and DDL statements behave exactly as beforeReferences