redash
redash copied to clipboard
Get rid of the strange looking 0 following "Running..." and "runtime"
trafficstars
What type of PR is this?
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] New Query Runner (Data Source)
- [ ] New Alert Destination
- [ ] Other
Description
In certain situations such as querying parquet data using Athena, it is possible for the query engine to scan 0 byte of data because of the presence of metadata. Currently when this happens, there is a strange "0" showing up in the UI:
-
When query is running:
-
When query finishes running:
This is because the
{queryResultData.metadata.data_scanned && (
<span className="m-l-5">
Data Scanned
<strong>{prettySize(queryResultData.metadata.data_scanned)}</strong>
</span>
)}
block ends up being the "0".
After applying the code changes in the PR:
-
When query is running:
-
When query finishes running:
The queryResultData.metadata.data_scanned && is unnecessary since the prettySize is able to deal with null values
How is this tested?
- [ ] Unit tests (pytest, jest)
- [ ] E2E Tests (Cypress)
- [ ] Manually
- [x] N/A
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
See attached screenshots above.