cryptoe commented on code in PR #14617:
URL: https://github.com/apache/druid/pull/14617#discussion_r1268087681
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/sql/resources/SqlStatementResource.java:
##########
@@ -536,8 +536,8 @@ private Optional<ResultSetInformation> getSampleResults(
rows = 0L;
size = 0L;
for (PageInformation pageInformation : pageList.get()) {
- rows += pageInformation.getNumRows();
- size += pageInformation.getSizeInBytes();
+ rows += pageInformation.getNumRows() != null ?
pageInformation.getNumRows() : 0L;
Review Comment:
Since page information is serialized as json in the `SqlStatementResult`, I
prefer `PageInformation#numRows` and `sizeOfBytes` to be Long. That way if they
are not populated for whatever reason, they are not sent across to the end
users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]