[ 
https://issues.apache.org/jira/browse/IMPALA-12824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819174#comment-17819174
 ] 

ASF subversion and git services commented on IMPALA-12824:
----------------------------------------------------------

Commit d03ffc70f2da0e313846d1595b1577824808f9da in impala's branch 
refs/heads/master from jasonmfehr
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=d03ffc70f ]

IMPALA-12824: Adds built-in functions prettyprint_duration and 
prettyprint_bytes.

The prettyprint_duration function takes an integer input containing a
number of nanoseconds and returns a human readable value breaking down
the input by hours, minutes, seconds, milliseconds, microseconds, and
nanoseconds.

The prettyprint_bytes function takes an integer input containing a
number of bytes and returns a human readable values breaking down the
input by gigabytes, megabytes, kilobytes, and bytes.

Functionality tests were added to the existing expr-test suite that
tests built-in functions.

Functional-query workloads were added in two new .test files under the
testdata directory to exercise these two new functions. Corresponding
pytests were added to run the tests in these new .test files.

Benchmarks were added to expr-benchmark, and new benchmarks were
generated with a release build running on a machine with the cpu
Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz.

Documentation was added to the built-in string functions docs.

Change-Id: I3e76632ce21ad2ca5df474160338699a542a6913
Reviewed-on: http://gerrit.cloudera.org:8080/21038
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Add Built-in Functions to Pretty Print Duration and Bytes.
> ----------------------------------------------------------
>
>                 Key: IMPALA-12824
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12824
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: be
>            Reporter: Jason Fehr
>            Assignee: Jason Fehr
>            Priority: Major
>              Labels: backend, functions
>
> Implement new built-in Impala string functions to pretty print time duration 
> from an input of nanoseconds and pretty print a memory value from an input of 
> bytes.
> For example, pretty printing a duration of 2147483648 nanoseconds would 
> output "2s147ms".  Pretty printing a memory value of 32768 would output 
> "32.00 KB".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to