You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/01/09 19:22:37 UTC

[GitHub] [druid] abhishekagarwal87 commented on pull request #10635: Add SQL functions to format numbers into human readable format

abhishekagarwal87 commented on pull request #10635:
URL: https://github.com/apache/druid/pull/10635#issuecomment-757354535


   I, for one, don't have a strong opinion. `decimal_format` here is equivalent to https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/text/CompactNumberFormat.html which I liked. So `decimal_format` could be  `compact_format`/`compact_number`
   The rest of the methods can be 
   
   `compact_decimal_byte_format`/`compact_decimal_byte_number`/`compact_number_decimal_byte`/`compact_number_to_decimal_byte` 
   and 
   `compact_binary_byte_format`/`compact_binary_byte_number`/`compact_number_binary_byte`/`compact_number_to_binary_byte` 
   
   `compact_number` / `compact_number_to_decimal_byte` / `compact_number_to_binary_byte` seems least ambiguous to me. That's all I can think of :) 
   
   Btw Java also has DecimalFormat which formats the number to any pattern use passes but doesn't compact it as such. 
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org