-
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.
fix: pull queries available on
/query
rest & ws endpoint (#3820)
* fix: pull queries available on `/query` rest & ws endpoint fixes: #3672 by providing alternative way of issuing pull queries that does NOT log Makes pull queries available on the `/query` RESTful and Websocket endpoints, in the same way that push queries are. Note: this change does not _remove_ pull query support from the `/ksql` endpoint, nor does it switch the CLI over to use the `/query` endpoint. The CLI continues to use the `/ksql` endpoint for pull queries. Push and pull queries to the `/query` rest endpoint now return the schema of the rows in the first message. This is required as the 'DESCRIBE' that CLI was previously running to get column headers doesn't work for pull queries yet. (Known issue: #3495). This is similar to the pattern used by the websocket endpoint, which also sends the schema in the first message. In addition, I've hidden null fields and added a 'header' row to return the schema of the data. The output now looks like: ```json [{"header":{"queryId":"someId","schema":"`USERID` STRING, `PAGEID` STRING, `VIEWTIME` BIGINT, `ROWKEY` STRING"}}, {"row":{"columns":["USER_1","PAGE_1",1,"1"]}}, {"row":{"columns":["USER_2","PAGE_2",2,"2"]}}, {"finalMessage":"Limit Reached"}]" ``` BREAKING CHANGE: the response from the RESTful API for push queries has changed: it now returns a line with the schema and query id in a `header` field and null fields are not included in the payload. The CLI is backwards compatible with older versions of the server, though it won't output column headings from older versions. (cherry picked from commit e2321f5)
- Loading branch information
1 parent
7cef15f
commit 9a47eaf
Showing
19 changed files
with
1,108 additions
and
283 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
Oops, something went wrong.