Add page information to SqlStatementResource API#14512
Add page information to SqlStatementResource API#14512cryptoe merged 5 commits intoapache:masterfrom
Conversation
cryptoe
left a comment
There was a problem hiding this comment.
Thanks for this. Left some comments.
| ) | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
If the page does not exist its also an error.
For eg: pageId=999 is passed but we only have 2 pages in the result, its also a invalid input.
There was a problem hiding this comment.
I have added this check below as "if page > 0" for the report since we don't really have a list of pages to check the index for yet and manually creating a list of a single page to check this doesn't make sense
| isSelectQuery ? SqlStatementResourceHelper.getResults(payload).orElse(null) : null, | ||
| ImmutableList.of( | ||
| new PageInformation( | ||
| rowsAndSize.orElse(new Pair<>(null, null)).lhs, |
There was a problem hiding this comment.
This should be populate from the counters.
We need to rework
SqlStatementResourceHelper.getRowsAndSizeFromPayload(
payload,
isSelectQuery
);
so its returns pageInformation.
The next set of changes that I am making then would not touch this piece of code.
There was a problem hiding this comment.
This might need to be handled at least partially in the next change, as counters don't really mean anything for results if the destination is the task report.
cryptoe
left a comment
There was a problem hiding this comment.
Changes LGTM.
Thanks @adarshsanjeev
This PR catches the console up to all the backend changes for Druid 27 Specifically: Add page information to SqlStatementResource API #14512 Allow empty tiered replicants map for load rules #14432 Adding Interactive API's for MSQ engine #14416 Add replication factor column to sys table #14403 Account for data format and compression in MSQ auto taskAssignment #14307 Errors take 3 #14004
This PR catches the console up to all the backend changes for Druid 27 Specifically: Add page information to SqlStatementResource API apache#14512 Allow empty tiered replicants map for load rules apache#14432 Adding Interactive API's for MSQ engine apache#14416 Add replication factor column to sys table apache#14403 Account for data format and compression in MSQ auto taskAssignment apache#14307 Errors take 3 apache#14004
This PR catches the console up to all the backend changes for Druid 27 Specifically: Add page information to SqlStatementResource API #14512 Allow empty tiered replicants map for load rules #14432 Adding Interactive API's for MSQ engine #14416 Add replication factor column to sys table #14403 Account for data format and compression in MSQ auto taskAssignment #14307 Errors take 3 #14004 Co-authored-by: Vadim Ogievetsky <vadim@ogievetsky.com>
* Changes the get results API in SqlStatementResource to take a page number instead of row/offset.
* Adds "pages" containing information on each page to the results status.
* Update the "numRows" and "sizeInByes" to "numTotalRows" and "totalSizeInBytes" respectively, which are totalled across all pages.
This PR catches the console up to all the backend changes for Druid 27 Specifically: Add page information to SqlStatementResource API apache#14512 Allow empty tiered replicants map for load rules apache#14432 Adding Interactive API's for MSQ engine apache#14416 Add replication factor column to sys table apache#14403 Account for data format and compression in MSQ auto taskAssignment apache#14307 Errors take 3 apache#14004
This PR makes a few changes to the SqlStatementResource
Payload:
This PR has: