Commit Graph

27 Commits

Author SHA1 Message Date
jasonmfehr
3e4fdeece1 IMPALA-12824: Removes the prettyprint_duration Built-in Function
The prettyprint_duration function was originally
implemented in IMPALA-12824 to work with the workload
management tables which stored durations in integer
nanoseconds. These tables have changed to store decimal
seconds.

The prettyprint_duration function would have required a
large investment of time to make it work with decimal
values, and since the new format is more human readable
anyways, this function has been removed.

Change-Id: If2154c2ed9a7217ed4b7587adeae87df55ff03dc
Reviewed-on: http://gerrit.cloudera.org:8080/21208
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2024-03-28 06:58:56 +00:00
Saurabh Katiyal
eb2939245f IMPALA-12693: [DOCS] Typo in link for ltrim in string functions docs
Fixed documentation typo for LTRIM string function, from LTRI to LTRIM.

Change-Id: If4345fc6d19f04d0c0c6feef3e0c8598271224fe
Reviewed-on: http://gerrit.cloudera.org:8080/21123
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Daniel Becker <daniel.becker@cloudera.com>
2024-03-13 09:20:16 +00:00
jasonmfehr
d03ffc70f2 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 <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2024-02-21 04:23:28 +00:00
Shajini Thayasingh
e90cf9c811 IMPALA-11119: [DOCS] document BYTES function
removed white spaces

Change-Id: Iffbe2979f2912cf014866a3c47d88601e04f6e75
Reviewed-on: http://gerrit.cloudera.org:8080/18272
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Quanlong Huang <huangquanlong@gmail.com>
2022-03-22 06:45:54 +00:00
Alex Rodoni
f08bad4f4a [DOCS] Copy edited INSTR() in impala_string_functions.xml
Change-Id: Ib14d49d4fb1341f810a2e355fa35067277e8ad3b
Reviewed-on: http://gerrit.cloudera.org:8080/14283
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-09-23 22:22:54 +00:00
Alex Rodoni
a23606902d [DOCS] A typo fix in FIND_IN_SET() function
Change-Id: Ia223761eda40842c7407f38b4dd2eba610f77418
Reviewed-on: http://gerrit.cloudera.org:8080/14281
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-09-23 19:08:11 +00:00
Alex Rodoni
eb5368f9bb ]IMPALA-8861: [DOCS] Documented Jaro and Jaro-Winkler functions
Change-Id: Id89410128acfc31d5072cf04a28bef26221f39f3
Reviewed-on: http://gerrit.cloudera.org:8080/14249
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Norbert Luksa <norbert.luksa@cloudera.com>
Reviewed-by: Zoltan Borok-Nagy <boroknagyz@cloudera.com>
2019-09-23 18:36:17 +00:00
Alex Rodoni
20dec47ae6 [DOCS] CONCAT function returns NULL if any argument is NULL
Change-Id: Ieadd249881b45944a870a616abf75ff4386615ea
Reviewed-on: http://gerrit.cloudera.org:8080/14156
Reviewed-by: Greg Rahn <grahn@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-08-28 19:31:57 +00:00
Alex Rodoni
e8bd307941 IMPALA-8812: [DOCS] Negative index support in SPLIT_PART function
Change-Id: I1b1810d317167fae5e0b050dfd6a7dd7a7762bb3
Reviewed-on: http://gerrit.cloudera.org:8080/13970
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Norbert Luksa <norbert.luksa@cloudera.com>
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
2019-08-01 17:24:50 +00:00
Alex Rodoni
b9302d50de [DOCS] Changed the example for the INITCAP function
Change-Id: Ic957e71afcde23952f1751e66203ad9992dbadaf
Reviewed-on: http://gerrit.cloudera.org:8080/13816
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-07-08 23:44:16 +00:00
Alex Rodoni
433640ccdc IMPALA-8745: [DOCS] More details on INITCAP() function
Change-Id: Iffead7bd8a8dab80992751cdde743165b9720ead
Reviewed-on: http://gerrit.cloudera.org:8080/13814
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2019-07-08 21:30:31 +00:00
Alex Rodoni
781cb915e5 IMPALA-7920: [DOCS] Document the LEVENSHTEIN function
Change-Id: Iefeb38871f14c87f8cce7feb9197ab0e79429d04
Reviewed-on: http://gerrit.cloudera.org:8080/12357
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Greg Rahn <grahn@cloudera.com>
2019-02-05 00:17:01 +00:00
Alex Rodoni
e8ee827a6d [DOCS] Built-in Functions doc format Changes
- The function titles were changed to upper case.
- The function titles no longer use <codeph>. <codeph> font appears
smaller than the <p> font.
- Return type were changed to upper case data types.
- Minor typos were fixed, such as extra commas and periods in titles.
- The indexterm dita elememts were removed. Indexterm was incomplete
and WIP. No plan to go ahead and implement it, so removed.

Change-Id: I797532463da8d29fe5bc7543cfdfb5b2b82db197
Reviewed-on: http://gerrit.cloudera.org:8080/11619
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Michael Brown <mikeb@cloudera.com>
2018-10-10 18:18:09 +00:00
Alex Rodoni
d0ec011b3d IMPALA-3330: [DOCS] TRANSLATE function updated
- Better description
- Examples

Change-Id: Ica33ecbb7118e3034f95c5705eed19d169dc16cb
Reviewed-on: http://gerrit.cloudera.org:8080/11074
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
2018-08-02 22:18:05 +00:00
Jinchul
1b706fb32b IMPALA-3282: [DOCS] Adds regexp_escape built-in function
Change-Id: Ied8e757c1b3012dd170b05da190d1598004d12cf
Reviewed-on: http://gerrit.cloudera.org:8080/10174
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2018-04-25 04:44:23 +00:00
Alex Rodoni
257ae0ea0d IMPALA-6623: [DOCS] ltrim and rtrim docs updated
Change-Id: If4f7a04e3c64eade7a23cded21de5ff91c9c8c8c
Reviewed-on: http://gerrit.cloudera.org:8080/9984
Reviewed-by: Zoram Thanga <zoram@cloudera.com>
Reviewed-by: Alex Rodoni <arodoni@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2018-04-11 22:02:16 +00:00
Alex Rodoni
ab5c98c28a IMPALA-6546: [DOCS] Add the new ODBC functions to docs
- Added the following new functions to the string functions doc:
left() and right()
- Added the following new functions to the date time functions doc:
monthname(), quarter(), week()
- Added quarter to extract() and date_part() as a unit

Change-Id: Icf31b50584628603c0c86ff0772a12ac6ac5c7b6
Reviewed-on: http://gerrit.cloudera.org:8080/9880
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Impala Public Jenkins
2018-04-02 21:04:07 +00:00
Alex Rodoni
04383f1769 IMPALA-6499: [DOCS] Fixed formatting errors in split_part function
Change-Id: I7623e32aaf31f21a3be4513f26deb0b789a56b1a
Reviewed-on: http://gerrit.cloudera.org:8080/9275
Reviewed-by: John Russell <jrussell@cloudera.com>
Tested-by: Impala Public Jenkins
2018-02-20 22:09:06 +00:00
John Russell
ceeb130c5d IMPALA-2172, IMPALA-6391: [DOCS] Distinguish char_length() from length()
Modify both char_length() and length() usage notes to say when they
return the same or different results.

Include the same example, showing both STRING and CHAR types,
under both functions.

Change-Id: I18cabfce66351bb890bfbfc26b93466204a82625
Reviewed-on: http://gerrit.cloudera.org:8080/9014
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins
2018-01-12 22:24:34 +00:00
John Russell
ac68913119 IMPALA-2107: [DOCS] Document base64*code() functions
base64decode()
base64encode()

Change-Id: I5251e368ad36756c19a7b97e5ef6f232f616189b
Reviewed-on: http://gerrit.cloudera.org:8080/7963
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Tested-by: Impala Public Jenkins
2017-09-07 23:41:25 +00:00
John Russell
bc1feb34d0 IMPALA-5030: [DOCS] Document nvl2() function
Change-Id: I8497e69d0f6db3c5e17b04e49a875c3efb43fab0
Reviewed-on: http://gerrit.cloudera.org:8080/7365
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins
2017-07-07 05:50:47 +00:00
John Russell
f2580acba5 IMPALA-5326: [DOCS] Document REPLACE() function
Included syntax, mention of performance benefit, and examples.
Also added an item in the "new features" list with a link to the
detailed writeup.

Change-Id: Ib576fba03673bd6708a46f45c8388477b25e34da
Reviewed-on: http://gerrit.cloudera.org:8080/6979
Reviewed-by: Greg Rahn <grahn@cloudera.com>
Reviewed-by: Michael Brown <mikeb@cloudera.com>
Tested-by: Impala Public Jenkins
2017-06-01 17:12:27 +00:00
John Russell
d9d4a6c69c IMPALA-3973: optional 3rd and 4th arguments for instr().
Change-Id: I17268bdb480230938f94559fe1eabe34ac2448b7
Reviewed-on: http://gerrit.cloudera.org:8080/5589
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Tested-by: Impala Public Jenkins
2017-05-19 18:57:24 +00:00
John Russell
f3820e6205 MPALA-3402: [DOCS] Remove CDH- JIRA numbers from rev=
For history and tracking purposes, there are many
instances of rev="CDH-1234" for various CDH- JIRA
numbers. This produces no visible output, it's just
FYI for the person editing the source. Removing all
these now from the upstream doc source, so as not
to have "CDH" all through the doc source files.

Change-Id: I29089e5a31cd72e876b2ccb8375d1c10693c6aba
Reviewed-on: http://gerrit.cloudera.org:8080/6349
Reviewed-by: Ambreen Kazi <ambreen.kazi@cloudera.com>
Reviewed-by: John Russell <jrussell@cloudera.com>
Tested-by: Impala Public Jenkins
2017-03-10 23:56:51 +00:00
John Russell
8377b9949c Global search/replace: audience="Cloudera" -> audience="hidden".
For this change to land in master, the audience="hidden" code review
needs to be completed first. Otherwise, the doc build would still work
but the audience="hidden" content would be visible rather than hidden as
desired.

Some work happening in parallel might introduce additional instances of
audience="Cloudera". I suggest addressing those in a followup CR so this
global change can land quickly.

Since the changes apply across so many different files, but are so
narrow in scope, I suggest that the way to validate (check that no
extraneous changes were introduced accidentally) is to diff just the
changed lines:

git diff -U0 HEAD^ HEAD

In patch set 2, I updated other topics marked audience="Cloudera"
by CRs that were pushed in the meantime.

Change-Id: Ic93d89da77e1f51bbf548a522d98d0c4e2fb31c8
Reviewed-on: http://gerrit.cloudera.org:8080/5613
Reviewed-by: John Russell <jrussell@cloudera.com>
Tested-by: Impala Public Jenkins
2017-01-18 19:31:57 +00:00
Jim Apple
d484d2f684 Add Apache license header to files in doc directory
This now gives a clean RAT check with bin/check-rat-report.py, which
is one way for the Impala community to check compliance with ASF rules
on intellectual property.

Change-Id: I2ad06435f84a65ba126759e42a18fdaf52cd7036
Reviewed-on: http://gerrit.cloudera.org:8080/5232
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Tested-by: Impala Public Jenkins
Reviewed-by: John Russell <jrussell@cloudera.com>
2016-12-02 23:54:32 +00:00
Jim Apple
3be0f122a5 IMPALA-3398: Add docs to main Impala branch.
These are refugees from doc_prototype. They can be rendered with the
DITA Open Toolkit version 2.3.3 by:

/tmp/dita-ot-2.3.3/bin/dita \
  -i impala.ditamap \
  -f html5 \
  -o $(mktemp -d) \
  -filter impala_html.ditaval

Change-Id: I8861e99adc446f659a04463ca78c79200669484f
Reviewed-on: http://gerrit.cloudera.org:8080/5014
Reviewed-by: John Russell <jrussell@cloudera.com>
Tested-by: John Russell <jrussell@cloudera.com>
2016-11-17 22:38:44 +00:00