From 117010185c252c4e687c7278c8a4855abceac140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Kokosi=C5=84ski?= Date: Fri, 6 Nov 2015 16:54:03 +0200 Subject: [PATCH] Product test fix #2 - fix registered functions --- .../checkArrayFunctionsRegistered.result | 16 +- .../checkArrayFunctionsRegistered.sql | 4 +- .../checkBinaryFunctionsRegistered.result | 15 +- .../checkBinaryFunctionsRegistered.sql | 2 +- .../checkHorologyFunctionsRegistered.result | 178 +++++++++--------- .../checkHorologyFunctionsRegistered.sql | 2 +- .../checkJsonFunctionsRegistered.result | 38 ++-- .../checkJsonFunctionsRegistered.sql | 2 +- .../checkMapFunctionsRegistered.result | 10 +- .../checkMapFunctionsRegistered.sql | 2 +- .../checkMathFunctionsRegistered.result | 136 ++++++++----- .../checkMathFunctionsRegistered.sql | 2 +- .../checkRegexFunctionsRegistered.result | 15 +- .../checkRegexFunctionsRegistered.sql | 2 +- .../checkStringFunctionsRegistered.result | 34 ++-- .../checkStringFunctionsRegistered.sql | 2 +- .../checkUrlFunctionsRegistered.result | 14 +- .../checkUrlFunctionsRegistered.sql | 2 +- 18 files changed, 265 insertions(+), 211 deletions(-) diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.result index 9a8be51fa7e43..46002cb20c637 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.result @@ -1,9 +1,9 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - concat | array, array | array | scalar | true - concat | array, E | array | scalar | true - concat | E, array | array | scalar | true - cardinality | array | bigint | scalar | true - contains | array, T | boolean | scalar | true - array_sort | array | array | scalar | true - array_intersect | array, array | array | scalar | true - array_distinct | array | array | scalar | true + concat | array | E, array | scalar | true | Concatenates an element to an array + concat | array | array, E | scalar | true | Concatenates an array to an element + concat | array | array, array | scalar | true | Concatenates given arrays + cardinality | bigint | map | scalar | true | + contains | boolean | array, T | scalar | true | Determines whether given value exists in the array + array_sort | array | array | scalar | true | Sorts the given array in ascending order according to the natural ordering of its elements. + array_intersect | array | array, array | scalar | true | Intersects elements of the two given arrays + array_distinct | array | array | scalar | true | Remove duplicate values from the given array diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.sql index 35decb18bbece..47e6a4e0de801 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/array_functions/checkArrayFunctionsRegistered.sql @@ -1,2 +1,2 @@ --- database: presto; groups: qe, array_functions, quarantine -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ +-- database: presto; groups: qe, array_functions +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.result index 9ed497ba0ab1d..84496c83cfb63 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.result @@ -1,8 +1,9 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - length | varbinary | bigint | scalar | true - to_base64 | varbinary | varchar | scalar | true - to_hex | varbinary | varchar | scalar | true - from_base64 | varbinary | varbinary | scalar | true - to_base64url | varbinary | varchar | scalar | true - from_base64url | varbinary | varbinary | scalar | true - from_hex | varbinary | varbinary | scalar | true + length | bigint | varbinary | scalar | true | length of the given binary + to_base64 | varchar | varbinary | scalar | true | encode binary data as base64 + to_base64url | varchar | varbinary | scalar | true | encode binary data as base64 using the URL safe alphabet + to_hex | varchar | varbinary | scalar | true | encode binary data as hex + from_base64 | varbinary | varbinary | scalar | true | decode base64 encoded binary data + from_base64 | varbinary | varchar | scalar | true | decode base64 encoded binary data + from_base64url | varbinary | varbinary | scalar | true | decode URL safe base64 encoded binary data + from_base64url | varbinary | varchar | scalar | true | decode URL safe base64 encoded binary data diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.sql index c4b32eb775a71..6da9e8df5282f 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/binary_functions/checkBinaryFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, binary_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.result index c599768d8db7e..a9b10ea872ee4 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.result @@ -1,89 +1,91 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - current_date | | date | scalar | true - current_time | | time with time zone | scalar | true - current_timestamp | | timestamp with time zone | scalar | true - current_timezone | | varchar | scalar | true - from_unixtime | double | timestamp | scalar | true - from_unixtime | double, bigint, bigint | timestamp with time zone | scalar | true - localtime | | time | scalar | true - localtimestamp | | timestamp | scalar | true - now | | timestamp with time zone | scalar | true - to_unixtime | timestamp with time zone | double | scalar | true - to_unixtime | timestamp | double | scalar | true - date_trunc | varchar, date | date | scalar | true - date_trunc | varchar, timestamp with time zone | timestamp with time zone | scalar | true - date_trunc | varchar, timestamp | timestamp | scalar | true - date_trunc | varchar, time with time zone | time with time zone | scalar | true - date_trunc | varchar, time | time | scalar | true - date_add | varchar, bigint, timestamp | timestamp | scalar | true - date_add | varchar, bigint, timestamp with time zone | timestamp with time zone | scalar | true - date_add | varchar, bigint, date | date | scalar | true - date_add | varchar, bigint, time | time | scalar | true - date_add | varchar, bigint, time with time zone | time with time zone | scalar | true - date_diff | varchar, timestamp, timestamp | bigint | scalar | true - date_diff | varchar, timestamp with time zone, timestamp with time zone | bigint | scalar | true - date_diff | varchar, time with time zone, time with time zone | bigint | scalar | true - date_diff | varchar, time, time | bigint | scalar | true - date_diff | varchar, date, date | bigint | scalar | true - date_format | timestamp, varchar | varchar | scalar | true - date_format | timestamp with time zone, varchar | varchar | scalar | true - date_parse | varchar, varchar | timestamp | scalar | true - format_datetime | timestamp, varchar | varchar | scalar | true - format_datetime | timestamp with time zone, varchar | varchar | scalar | true - parse_datetime | varchar, varchar | timestamp with time zone | scalar | true - day | timestamp with time zone | bigint | scalar | true - day | date | bigint | scalar | true - day | interval day to second | bigint | scalar | true - day | timestamp | bigint | scalar | true - day_of_month | date | bigint | scalar | true - day_of_month | interval day to second | bigint | scalar | true - day_of_month | timestamp | bigint | scalar | true - day_of_month | timestamp with time zone | bigint | scalar | true - day_of_week | timestamp | bigint | scalar | true - day_of_week | timestamp with time zone | bigint | scalar | true - day_of_week | date | bigint | scalar | true - day_of_year | timestamp | bigint | scalar | true - day_of_year | date | bigint | scalar | true - day_of_year | timestamp with time zone | bigint | scalar | true - dow | timestamp with time zone | bigint | scalar | true - dow | date | bigint | scalar | true - dow | timestamp | bigint | scalar | true - doy | date | bigint | scalar | true - doy | timestamp | bigint | scalar | true - doy | timestamp with time zone | bigint | scalar | true - hour | time with time zone | bigint | scalar | true - hour | interval day to second | bigint | scalar | true - hour | timestamp with time zone | bigint | scalar | true - hour | time | bigint | scalar | true - hour | timestamp | bigint | scalar | true - minute | timestamp | bigint | scalar | true - minute | timestamp with time zone | bigint | scalar | true - minute | time | bigint | scalar | true - minute | time with time zone | bigint | scalar | true - minute | interval day to second | bigint | scalar | true - quarter | timestamp | bigint | scalar | true - quarter | timestamp with time zone | bigint | scalar | true - quarter | date | bigint | scalar | true - second | timestamp | bigint | scalar | true - second | time with time zone | bigint | scalar | true - second | interval day to second | bigint | scalar | true - second | time | bigint | scalar | true - second | timestamp with time zone | bigint | scalar | true - timezone_hour | timestamp with time zone | bigint | scalar | true - timezone_minute | timestamp with time zone | bigint | scalar | true - week | timestamp with time zone | bigint | scalar | true - week | date | bigint | scalar | true - week | timestamp | bigint | scalar | true - week_of_year | timestamp with time zone | bigint | scalar | true - week_of_year | timestamp | bigint | scalar | true - week_of_year | date | bigint | scalar | true - year | date | bigint | scalar | true - year | timestamp with time zone | bigint | scalar | true - year | timestamp | bigint | scalar | true - year | interval year to month | bigint | scalar | true - year_of_week | date | bigint | scalar | true - year_of_week | timestamp | bigint | scalar | true - year_of_week | timestamp with time zone | bigint | scalar | true - yow | timestamp | bigint | scalar | true - yow | timestamp with time zone | bigint | scalar | true - yow | date | bigint | scalar | true + current_date | date | | scalar | true | current date + current_time | time with time zone | | scalar | true | current time with time zone + current_timestamp | timestamp with time zone | | scalar | true | current timestamp with time zone + current_timezone | varchar | | scalar | true | current time zone + date_add | date | varchar, bigint, date | scalar | true | add the specified amount of date to the given date + date_add | time | varchar, bigint, time | scalar | true | add the specified amount of time to the given time + date_add | time with time zone | varchar, bigint, time with time zone | scalar | true | add the specified amount of time to the given time + date_add | timestamp | varchar, bigint, timestamp | scalar | true | add the specified amount of time to the given timestamp + date_add | timestamp with time zone | varchar, bigint, timestamp with time zone | scalar | true | add the specified amount of time to the given timestamp + date_diff | bigint | varchar, date, date | scalar | true | difference of the given dates in the given unit + date_diff | bigint | varchar, time with time zone, time with time zone | scalar | true | difference of the given times in the given unit + date_diff | bigint | varchar, time, time | scalar | true | difference of the given times in the given unit + date_diff | bigint | varchar, timestamp with time zone, timestamp with time zone | scalar | true | difference of the given times in the given unit + date_diff | bigint | varchar, timestamp, timestamp | scalar | true | difference of the given times in the given unit + date_format | varchar | timestamp with time zone, varchar | scalar | true | + date_format | varchar | timestamp, varchar | scalar | true | + date_parse | timestamp | varchar, varchar | scalar | true | + date_trunc | date | varchar, date | scalar | true | truncate to the specified precision in the session timezone + date_trunc | time | varchar, time | scalar | true | truncate to the specified precision in the session timezone + date_trunc | time with time zone | varchar, time with time zone | scalar | true | truncate to the specified precision + date_trunc | timestamp | varchar, timestamp | scalar | true | truncate to the specified precision in the session timezone + date_trunc | timestamp with time zone | varchar, timestamp with time zone | scalar | true | truncate to the specified precision + day | bigint | date | scalar | true | day of the month of the given date + day | bigint | interval day to second | scalar | true | day of the month of the given interval + day | bigint | timestamp | scalar | true | day of the month of the given timestamp + day | bigint | timestamp with time zone | scalar | true | day of the month of the given timestamp + day_of_month | bigint | date | scalar | true | day of the month of the given date + day_of_month | bigint | interval day to second | scalar | true | day of the month of the given interval + day_of_month | bigint | timestamp | scalar | true | day of the month of the given timestamp + day_of_month | bigint | timestamp with time zone | scalar | true | day of the month of the given timestamp + day_of_week | bigint | date | scalar | true | day of the week of the given date + day_of_week | bigint | timestamp | scalar | true | day of the week of the given timestamp + day_of_week | bigint | timestamp with time zone | scalar | true | day of the week of the given timestamp + day_of_year | bigint | date | scalar | true | day of the year of the given date + day_of_year | bigint | timestamp | scalar | true | day of the year of the given timestamp + day_of_year | bigint | timestamp with time zone | scalar | true | day of the year of the given timestamp + dow | bigint | date | scalar | true | day of the week of the given date + dow | bigint | timestamp | scalar | true | day of the week of the given timestamp + dow | bigint | timestamp with time zone | scalar | true | day of the week of the given timestamp + doy | bigint | date | scalar | true | day of the year of the given date + doy | bigint | timestamp | scalar | true | day of the year of the given timestamp + doy | bigint | timestamp with time zone | scalar | true | day of the year of the given timestamp + e | double | | scalar | true | Euler's number + format_datetime | varchar | timestamp with time zone, varchar | scalar | true | formats the given time by the given format + format_datetime | varchar | timestamp, varchar | scalar | true | formats the given time by the given format + from_iso8601_date | date | varchar | scalar | true | + from_iso8601_timestamp | timestamp with time zone | varchar | scalar | true | + from_unixtime | timestamp | double | scalar | true | + from_unixtime | timestamp with time zone | double, bigint, bigint | scalar | true | + hour | bigint | interval day to second | scalar | true | hour of the day of the given interval + hour | bigint | time | scalar | true | hour of the day of the given time + hour | bigint | time with time zone | scalar | true | hour of the day of the given time + hour | bigint | timestamp | scalar | true | hour of the day of the given timestamp + hour | bigint | timestamp with time zone | scalar | true | hour of the day of the given timestamp + localtime | time | | scalar | true | current time without time zone + localtimestamp | timestamp | | scalar | true | current timestamp without time zone + minute | bigint | interval day to second | scalar | true | minute of the hour of the given interval + minute | bigint | time | scalar | true | minute of the hour of the given time + minute | bigint | time with time zone | scalar | true | minute of the hour of the given time + minute | bigint | timestamp | scalar | true | minute of the hour of the given timestamp + minute | bigint | timestamp with time zone | scalar | true | minute of the hour of the given timestamp + month | bigint | date | scalar | true | month of the year of the given date + month | bigint | interval year to month | scalar | true | month of the year of the given interval + month | bigint | timestamp | scalar | true | month of the year of the given timestamp + month | bigint | timestamp with time zone | scalar | true | month of the year of the given timestamp + now | timestamp with time zone | | scalar | true | current timestamp with time zone + parse_datetime | timestamp with time zone | varchar, varchar | scalar | true | parses the specified date/time by the given format + quarter | bigint | date | scalar | true | quarter of the year of the given date + quarter | bigint | timestamp | scalar | true | quarter of the year of the given timestamp + quarter | bigint | timestamp with time zone | scalar | true | quarter of the year of the given timestamp + timezone_hour | bigint | timestamp with time zone | scalar | true | time zone hour of the given timestamp + timezone_minute | bigint | timestamp with time zone | scalar | true | time zone minute of the given timestamp + to_unixtime | double | timestamp | scalar | true | + to_unixtime | double | timestamp with time zone | scalar | true | + week | bigint | date | scalar | true | week of the year of the given date + week | bigint | timestamp | scalar | true | week of the year of the given timestamp + week | bigint | timestamp with time zone | scalar | true | week of the year of the given timestamp + week_of_year | bigint | date | scalar | true | week of the year of the given date + week_of_year | bigint | timestamp | scalar | true | week of the year of the given timestamp + week_of_year | bigint | timestamp with time zone | scalar | true | week of the year of the given timestamp + year | bigint | date | scalar | true | year of the given date + year | bigint | interval year to month | scalar | true | year of the given interval + year | bigint | timestamp | scalar | true | year of the given timestamp + year | bigint | timestamp with time zone | scalar | true | year of the given timestamp + year_of_week | bigint | date | scalar | true | year of the ISO week of the given date + year_of_week | bigint | timestamp | scalar | true | year of the ISO week of the given timestamp + year_of_week | bigint | timestamp with time zone | scalar | true | year of the ISO week of the given timestamp + yow | bigint | date | scalar | true | year of the ISO week of the given date + yow | bigint | timestamp | scalar | true | year of the ISO week of the given timestamp + yow | bigint | timestamp with time zone | scalar | true | year of the ISO week of the given timestamp diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.sql index d4ffce24cbaaa..b7652b83278d3 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/horology_functions/checkHorologyFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, horology_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ \ No newline at end of file +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.result index 2951ad8db2ca3..e78e600c3e356 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.result @@ -1,19 +1,21 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - json_array_get | varchar, bigint | json | scalar | true - json_array_get | json, bigint | json | scalar | true - json_extract_scalar | varchar, JsonPath | varchar | scalar | true - json_extract_scalar | json, JsonPath | varchar | scalar | true - json_array_contains | json, boolean | boolean | scalar | true - json_array_contains | json, bigint | boolean | scalar | true - json_array_contains | json, varchar | boolean | scalar | true - json_array_contains | json, double | boolean | scalar | true - json_array_contains | varchar, varchar | boolean | scalar | true - json_array_contains | varchar, double | boolean | scalar | true - json_array_contains | varchar, bigint | boolean | scalar | true - json_array_contains | varchar, boolean | boolean | scalar | true - json_extract | varchar, JsonPath | json | scalar | true - json_extract | json, JsonPath | json | scalar | true - json_size | varchar, JsonPath | bigint | scalar | true - json_size | json, JsonPath | bigint | scalar | true - json_array_length | varchar | bigint | scalar | true - json_array_length | json | bigint | scalar | true + json_array_contains | boolean | json, bigint | scalar | true | + json_array_contains | boolean | json, boolean | scalar | true | + json_array_contains | boolean | json, double | scalar | true | + json_array_contains | boolean | json, varchar | scalar | true | + json_array_contains | boolean | varchar, bigint | scalar | true | + json_array_contains | boolean | varchar, boolean | scalar | true | + json_array_contains | boolean | varchar, double | scalar | true | + json_array_contains | boolean | varchar, varchar | scalar | true | + json_array_get | json | json, bigint | scalar | true | + json_array_get | json | varchar, bigint | scalar | true | + json_array_length | bigint | json | scalar | true | + json_array_length | bigint | varchar | scalar | true | + json_extract | json | json, JsonPath | scalar | true | + json_extract | json | varchar, JsonPath | scalar | true | + json_extract_scalar | varchar | json, JsonPath | scalar | true | + json_extract_scalar | varchar | varchar, JsonPath | scalar | true | + json_format | varchar | json | scalar | true | + json_parse | json | varchar | scalar | true | + json_size | bigint | json, JsonPath | scalar | true | + json_size | bigint | varchar, JsonPath | scalar | true | diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.sql index e2d7660191866..46800a72726ef 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/json_functions/checkJsonFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, json_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ \ No newline at end of file +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.result index 7c48d8f3bd0d8..974a76fa92dbb 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.result @@ -1,6 +1,6 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - cardinality | map | bigint | scalar | true - map | array, array | map | scalar | true - map_keys | map | array | scalar | true - map_values | map | array | scalar | true - map_agg | K, V | map | aggregate | true + cardinality | bigint | map | scalar | true | + map | map | array, array | scalar | true | Constructs a map from the given key/value arrays + map_agg | map | K, V | aggregate | true | Aggregates all the rows (key/value pairs) into a single map + map_keys | array | map | scalar | true | Returns the keys of the given map as an array + map_values | array | map | scalar | true | Returns the values of the given map as an array diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.sql index 2ada281d74427..41f9337f2958f 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/map_functions/checkMapFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, map_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ \ No newline at end of file +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.result index 14336e1c5ad8c..14fb58b74bd87 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.result @@ -1,45 +1,93 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - infinity | | double | scalar | true - ceiling | bigint | bigint | scalar | true - ceiling | double | double | scalar | true - ceil | bigint | bigint | scalar | true - ceil | double | double | scalar | true - abs | double | double | scalar | true - abs | bigint | bigint | scalar | true - sin | double | double | scalar | true - cos | double | double | scalar | true - tan | double | double | scalar | true - atan2 | double, double | double | scalar | true - sqrt | double | double | scalar | true - log | double, double | double | scalar | true - log10 | double | double | scalar | true - pow | double, double | double | scalar | true - exp | double | double | scalar | true - is_nan | double | boolean | scalar | true - nan | | double | scalar | true - is_finite | double | boolean | scalar | true - is_infinite | double | boolean | scalar | true - acos | double | double | scalar | true - asin | double | double | scalar | true - atan | double | double | scalar | true - cbrt | double | double | scalar | true - cosh | double | double | scalar | true - floor | double | double | scalar | true - floor | bigint | bigint | scalar | true - random | | double | scalar | false - rand | | double | scalar | false - round | double | double | scalar | true - round | double, bigint | double | scalar | true - round | bigint, bigint | bigint | scalar | true - round | bigint | bigint | scalar | true - tanh | double | double | scalar | true - mod | double, double | double | scalar | true - mod | bigint, bigint | bigint | scalar | true - e | | double | scalar | true - degrees | double | double | scalar | true - radians | double | double | scalar | true - ln | double | double | scalar | true - log2 | double | double | scalar | true - pi | | double | scalar | true - to_base | bigint, bigint | varchar | scalar | true - from_base | varchar, bigint | bigint | scalar | true + abs | bigint | bigint | scalar | true | absolute value + abs | double | double | scalar | true | absolute value + acos | double | double | scalar | true | arc cosine + approx_distinct | bigint | bigint | aggregate | true | + approx_distinct | bigint | bigint, double | aggregate | true | + approx_distinct | bigint | double | aggregate | true | + approx_distinct | bigint | double, double | aggregate | true | + approx_percentile | bigint | bigint, bigint, double | aggregate | true | + approx_percentile | bigint | bigint, double | aggregate | true | + approx_percentile | double | double, bigint, double | aggregate | true | + approx_percentile | double | double, double | aggregate | true | + approx_set | HyperLogLog | bigint | aggregate | true | + approx_set | HyperLogLog | double | aggregate | true | + arbitrary | T | T | aggregate | true | return an arbitrary non-null input value + asin | double | double | scalar | true | arc sine + atan | double | double | scalar | true | arc tangent + atan2 | double | double, double | scalar | true | arc tangent of given fraction + avg | double | bigint | aggregate | true | + avg | double | double | aggregate | true | + bool_and | boolean | boolean | aggregate | true | + bool_or | boolean | boolean | aggregate | true | + cbrt | double | double | scalar | true | cube root + ceil | bigint | bigint | scalar | true | round up to nearest integer + ceil | double | double | scalar | true | round up to nearest integer + ceiling | bigint | bigint | scalar | true | round up to nearest integer + ceiling | double | double | scalar | true | round up to nearest integer + corr | double | double, double | aggregate | true | + cos | double | double | scalar | true | cosine + cosh | double | double | scalar | true | hyperbolic cosine + count | bigint | | aggregate | true | + count | bigint | T | aggregate | true | Counts the non-null values + count_if | bigint | boolean | aggregate | true | + covar_pop | double | double, double | aggregate | true | + covar_samp | double | double, double | aggregate | true | + cume_dist | double | | window | true | + degrees | double | double | scalar | true | converts an angle in radians to degrees + dense_rank | bigint | | window | true | + e | double | | scalar | true | Euler's number + every | boolean | boolean | aggregate | true | + exp | double | double | scalar | true | Euler's number raised to the given power + floor | bigint | bigint | scalar | true | round down to nearest integer + floor | double | double | scalar | true | round down to nearest integer + geometric_mean | double | bigint | aggregate | true | + geometric_mean | double | double | aggregate | true | + greatest | E | E | scalar | true | get the largest of the given values + infinity | double | | scalar | true | Infinity + ln | double | double | scalar | true | natural logarithm + log | double | double, double | scalar | true | logarithm to given base + log10 | double | double | scalar | true | logarithm to base 10 + log2 | double | double | scalar | true | logarithm to base 2 + max | E | E | aggregate | true | Returns the maximum value of the argument + max_by | V | V, K | aggregate | true | Returns the value of the first argument, associated with the maximum value of the second argument + min | E | E | aggregate | true | Returns the minimum value of the argument + min_by | V | V, K | aggregate | true | Returns the value of the first argument, associated with the minimum value of the second argument + mod | bigint | bigint, bigint | scalar | true | remainder of given quotient + mod | double | double, double | scalar | true | remainder of given quotient + nan | double | | scalar | true | constant representing not-a-number + nth_value | T | T, bigint | window | true | + ntile | bigint | bigint | window | true | + percent_rank | double | | window | true | + pi | double | | scalar | true | the constant Pi + pow | double | double, double | scalar | true | value raised to the power of exponent + power | double | double, double | scalar | true | value raised to the power of exponent + radians | double | double | scalar | true | converts an angle in degrees to radians + rand | double | | scalar | false | a pseudo-random value + random | double | | scalar | false | a pseudo-random value + rank | bigint | | window | true | + regr_intercept | double | double, double | aggregate | true | + regr_slope | double | double, double | aggregate | true | + round | bigint | bigint | scalar | true | round to nearest integer + round | bigint | bigint, bigint | scalar | true | round to nearest integer + round | double | double | scalar | true | round to nearest integer + round | double | double, bigint | scalar | true | round to given number of decimal places + row_number | bigint | | window | true | + sin | double | double | scalar | true | sine + sqrt | double | double | scalar | true | square root + stddev | double | bigint | aggregate | true | + stddev | double | double | aggregate | true | + stddev_pop | double | bigint | aggregate | true | + stddev_pop | double | double | aggregate | true | + stddev_samp | double | bigint | aggregate | true | + stddev_samp | double | double | aggregate | true | + sum | bigint | bigint | aggregate | true | + sum | double | double | aggregate | true | + tan | double | double | scalar | true | tangent + tanh | double | double | scalar | true | hyperbolic tangent + var_pop | double | bigint | aggregate | true | + var_pop | double | double | aggregate | true | + var_samp | double | bigint | aggregate | true | + var_samp | double | double | aggregate | true | + variance | double | bigint | aggregate | true | + variance | double | double | aggregate | true | diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.sql index b79adbb12bc86..966456dda7bb2 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/math_functions/checkMathFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, math_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ \ No newline at end of file +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.result index c9e6e195e426b..96b9372add727 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.result @@ -1,8 +1,9 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - regexp_like | varchar, RegExp | boolean | scalar | true - regexp_replace | varchar, RegExp, varchar | varchar | scalar | true - regexp_replace | varchar, RegExp | varchar | scalar | true - regexp_extract_all | varchar, RegExp, bigint | array | scalar | true - regexp_extract_all | varchar, RegExp | array | scalar | true - regexp_extract | varchar, RegExp, bigint | varchar | scalar | true - regexp_extract | varchar, RegExp | varchar | scalar | true + regexp_extract | varchar | varchar, RegExp | scalar | true | string extracted using the given pattern + regexp_extract | varchar | varchar, RegExp, bigint | scalar | true | returns regex group of extracted string with a pattern + regexp_extract_all | array | varchar, RegExp | scalar | true | string(s) extracted using the given pattern + regexp_extract_all | array | varchar, RegExp, bigint | scalar | true | group(s) extracted using the given pattern + regexp_like | boolean | varchar, RegExp | scalar | true | returns substrings matching a regular expression + regexp_replace | varchar | varchar, RegExp | scalar | true | removes substrings matching a regular expression + regexp_replace | varchar | varchar, RegExp, varchar | scalar | true | replaces substrings matching a regular expression by given string + regexp_split | array | varchar, RegExp | scalar | true | returns array of strings split by pattern diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.sql index 885b50d0b970f..63ce7a9908848 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/regex_functions/checkRegexFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, regex_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ \ No newline at end of file +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.result index 9424923be03b5..9f5ca78b598de 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.result @@ -1,18 +1,18 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true -chr | bigint | varchar | scalar | true -concat | varchar | varchar | scalar | true -length | varchar | bigint | scalar | true -lower | varchar | varchar | scalar | true -ltrim | varchar | varchar | scalar | true -replace | varchar, varchar | varchar | scalar | true -replace | varchar, varchar, varchar | varchar | scalar | true -reverse | varchar | varchar | scalar | true -rtrim | varchar | varchar | scalar | true -split | varchar, varchar | array | scalar | true -split | varchar, varchar, bigint | array | scalar | true -split_part | varchar, varchar, bigint | varchar | scalar | true -strpos | varchar, varchar | bigint | scalar | true -substr | varchar, bigint | varchar | scalar | true -substr | varchar, bigint, bigint | varchar | scalar | true -trim | varchar | varchar | scalar | true -upper | varchar | varchar | scalar | true + chr | varchar | bigint | scalar | true | convert Unicode code point to a string + concat | varchar | varchar | scalar | true | concatenates given strings + length | bigint | varchar | scalar | true | count of code points of the given string + lower | varchar | varchar | scalar | true | converts the string to lower case + ltrim | varchar | varchar | scalar | true | removes whitespace from the beginning of a string + replace | varchar | varchar, varchar | scalar | true | greedily removes occurrences of a pattern in a string + replace | varchar | varchar, varchar, varchar | scalar | true | greedily replaces occurrences of a pattern with a string + reverse | varchar | varchar | scalar | true | reverse all code points in a given string + rtrim | varchar | varchar | scalar | true | removes whitespace from the end of a string + split | array | varchar, varchar | scalar | true | + split | array | varchar, varchar, bigint | scalar | true | + split_part | varchar | varchar, varchar, bigint | scalar | true | splits a string by a delimiter and returns the specified field (counting from one) + strpos | bigint | varchar, varchar | scalar | true | returns index of first occurrence of a substring (or 0 if not found) + substr | varchar | varchar, bigint | scalar | true | suffix starting at given index + substr | varchar | varchar, bigint, bigint | scalar | true | substring of given length starting at an index + trim | varchar | varchar | scalar | true | removes whitespace from the beginning and end of a string + upper | varchar | varchar | scalar | true | converts the string to upper case diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.sql index 0905b32cb6d1d..60f5796641383 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/string_functions/checkStringFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, string_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ \ No newline at end of file +show functions diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.result b/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.result index 98d2057dd3c51..6751903bfde9e 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.result +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.result @@ -1,8 +1,8 @@ -- delimiter: |; ignoreOrder: true; ignoreExcessRows: true; trimValues:true - url_extract_protocol | varchar | varchar | scalar | true - url_extract_host | varchar | varchar | scalar | true - url_extract_query | varchar | varchar | scalar | true - url_extract_fragment | varchar | varchar | scalar | true - url_extract_parameter | varchar, varchar | varchar | scalar | true - url_extract_port | varchar | bigint | scalar | true - url_extract_path | varchar | varchar | scalar | true + url_extract_fragment | varchar | varchar | scalar | true | extract fragment from url + url_extract_host | varchar | varchar | scalar | true | extract host from url + url_extract_parameter | varchar | varchar, varchar | scalar | true | extract query parameter from url + url_extract_path | varchar | varchar | scalar | true | extract part from url + url_extract_port | bigint | varchar | scalar | true | extract port from url + url_extract_protocol | varchar | varchar | scalar | true | extract protocol from url + url_extract_query | varchar | varchar | scalar | true | extract query from url diff --git a/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.sql b/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.sql index 8e0505135c803..ec895f4aa7c37 100644 --- a/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.sql +++ b/presto-product-tests/src/main/resources/sql-tests/testcases/url_functions/checkUrlFunctionsRegistered.sql @@ -1,2 +1,2 @@ -- database: presto; groups: qe, url_functions -select function_name, argument_types, return_type, function_type, deterministic from system.information_schema.__internal_functions__ +show functions