bito-code-review[bot] commented on PR #43115:
URL: https://github.com/apache/superset/pull/43115#issuecomment-5282022907

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation uses 
`setRowCount(response?.rowcount ?? 0)`, which forces an absent `rowcount` to 
`0`, potentially triggering misleading UI states. To resolve this, you should 
handle the `undefined` case explicitly to distinguish between an actual empty 
result set and an unknown row count, or derive the count from the `data` array 
length if `rowcount` is missing.
   
   Would you like me to fetch all other comments on this PR to validate and 
implement fixes for them as well?
   
   
**superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx**
   ```
   const rowCount = response?.rowcount ?? (response?.data ? 
response.data.length : undefined);
   setRowCount(rowCount);
   ```


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