LakshSingla commented on code in PR #14617:
URL: https://github.com/apache/druid/pull/14617#discussion_r1268218555


##########
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:
   In that case, please add `@JsonInclude(JsonInclude.Include.NON_NULL)` to the 
Jackson annotations of the members of `PageInformation`. By default, we do 
serialize and present null values to the user. So per the current behavior, 
page information would get serialized as 
`{"numRows":null,"sizeInBytes":null,"id":5}`. 
   
   Approving the PR since the fix is not related to the current change. 



-- 
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]

Reply via email to