Quanlong Huang has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24880


Change subject: IMPALA-15360: Fix /catalog estimated memory column fails to 
render
......................................................................

IMPALA-15360: Fix /catalog estimated memory column fails to render

getReadableSize() in www/scripts/common_util.js actually receives a
string type value. When larger than 1e3, it's divided by 1e3 then
becomes a number. However, if the original value is smaller than 1e3, it
keeps using the string type which doesn't have the toFixed() function.
This fails the column rendering in DataTables.

This patch fixes the issue by explicitly cast the value to a number.
Also adds unit tests for the function.

Testing
 - Ran tests/webui/run-js-tests.sh

Assisted-by: Opus 4.8 (Claude Code)
Change-Id: Id8e339c6fe6698c170cc1a41ba731c4f35d132ce
---
A tests/webui/js_tests/common/common_util.test.js
M www/scripts/common_util.js
2 files changed, 47 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/24880/1
--
To view, visit http://gerrit.cloudera.org:8080/24880
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8e339c6fe6698c170cc1a41ba731c4f35d132ce
Gerrit-Change-Number: 24880
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <[email protected]>

Reply via email to