-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cli to show tombstones in transient query output (#6462)
fixes: #3616 The output from transient queries that return tables will now include tombstones when run in the CLI or using the REST API directly. Tombstones indicate an existing row has been deleted. CLI output now looks like: ``` ksql> SELECT * FROM SOME_TABLE EMIT CHANGES; | ID | COL0 | COL1 | +-------+-------------+-------------+ | 10 | A | B | | 20 | E | F | | 10 | <TOMBSTONE> | <TOMBSTONE> | <-- previous row '10' has been deleted. | 11 | X | Y | ``` To facilitate this, the response from the rest api needed to evolve. The query response includes a single `header`, followed by `row`'s of data. Previously, this looked like: ``` {"header":{"queryId":"X","schema":"`ID` BIGINT, `COL0` STRING, `COL1` STRING"}}, {"row":{"columns":[10,A,B]}}, {"row":{"columns":[20,E,F]}}, {"row":{"columns":[11,X,Y]}}, ``` For queries returning table rows, the result now looks like: ``` {"header":{"queryId":"X","schema":"`ID` BIGINT, `COL0` STRING, `COL1` STRING"}}, {"row":{"columns":[10,A,B]}}, {"row":{"columns":[20,E,F]}}, {"row":{"columns":[10,null,null],"tombstone":true}}, {"row":{"columns":[11,X,Y]}} ``` Note how a row can now be flagged as a `tombstone`. Such rows will have all non-key columns set to `null`, (which may be all columns if no key columns are in the projection). **NOTE**: the old websocket query api is yet to be updated to support tombstones: #6439, and the same goes for the new client API: #6438 Co-authored-by: Andy Coates <big-andy-coates@users.noreply.github.com>
- Loading branch information
1 parent
8f84e41
commit ef3039a
Showing
92 changed files
with
2,176 additions
and
529 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.