|
| 1 | + |
| 2 | +# Functions |
| 3 | + |
| 4 | +PPL supports a wide range of built-in functions for data processing and analysis. These functions are organized into categories based on their functionality and can be used within PPL queries to manipulate and transform data. |
| 5 | + |
| 6 | +- [Aggregation Functions](aggregations.md) |
| 7 | + - [COUNT](aggregations.md/#count) |
| 8 | + - [SUM](aggregations.md/#sum) |
| 9 | + - [AVG](aggregations.md/#avg) |
| 10 | + - [MAX](aggregations.md/#max) |
| 11 | + - [MIN](aggregations.md/#min) |
| 12 | + - [VAR_SAMP](aggregations.md/#var_samp) |
| 13 | + - [VAR_POP](aggregations.md/#var_pop) |
| 14 | + - [STDDEV_SAMP](aggregations.md/#stddev_samp) |
| 15 | + - [STDDEV_POP](aggregations.md/#stddev_pop) |
| 16 | + - [DISTINCT_COUNT, DC](aggregations.md/#distinct_count-dc) |
| 17 | + - [DISTINCT_COUNT_APPROX](aggregations.md/#distinct_count_approx) |
| 18 | + - [EARLIEST](aggregations.md/#earliest) |
| 19 | + - [LATEST](aggregations.md/#latest) |
| 20 | + - [TAKE](aggregations.md/#take) |
| 21 | + - [PERCENTILE, PERCENTILE_APPROX](aggregations.md/#percentile-or-percentile_approx) |
| 22 | + - [MEDIAN](aggregations.md/#median) |
| 23 | + - [FIRST](aggregations.md/#first) |
| 24 | + - [LAST](aggregations.md/#last) |
| 25 | + - [LIST](aggregations.md/#list) |
| 26 | + - [VALUES](aggregations.md/#values) |
| 27 | + |
| 28 | +- [Collection Functions](collection.md) |
| 29 | + - [ARRAY](collection.md/#array) |
| 30 | + - [ARRAY_LENGTH](collection.md/#array_length) |
| 31 | + - [FORALL](collection.md/#forall) |
| 32 | + - [EXISTS](collection.md/#exists) |
| 33 | + - [FILTER](collection.md/#filter) |
| 34 | + - [TRANSFORM](collection.md/#transform) |
| 35 | + - [REDUCE](collection.md/#reduce) |
| 36 | + - [MVJOIN](collection.md/#mvjoin) |
| 37 | + - [MVAPPEND](collection.md/#mvappend) |
| 38 | + - [SPLIT](collection.md/#split) |
| 39 | + - [MVDEDUP](collection.md/#mvdedup) |
| 40 | + - [MVFIND](collection.md/#mvfind) |
| 41 | + - [MVINDEX](collection.md/#mvindex) |
| 42 | + - [MVMAP](collection.md/#mvmap) |
| 43 | + - [MVZIP](collection.md/#mvzip) |
| 44 | + |
| 45 | +- [Condition Functions](condition.md) |
| 46 | + - [ISNULL](condition.md/#isnull) |
| 47 | + - [ISNOTNULL](condition.md/#isnotnull) |
| 48 | + - [EXISTS](condition.md/#exists) |
| 49 | + - [IFNULL](condition.md/#ifnull) |
| 50 | + - [NULLIF](condition.md/#nullif) |
| 51 | + - [IF](condition.md/#if) |
| 52 | + - [CASE](condition.md/#case) |
| 53 | + - [COALESCE](condition.md/#coalesce) |
| 54 | + - [ISPRESENT](condition.md/#ispresent) |
| 55 | + - [ISBLANK](condition.md/#isblank) |
| 56 | + - [ISEMPTY](condition.md/#isempty) |
| 57 | + - [EARLIEST](condition.md/#earliest) |
| 58 | + - [LATEST](condition.md/#latest) |
| 59 | + - [REGEXP_MATCH](condition.md/#regexp_match) |
| 60 | + |
| 61 | +- [Type Conversion Functions](conversion.md) |
| 62 | + - [CAST](conversion.md/#cast) |
| 63 | + - [TOSTRING](conversion.md/#tostring) |
| 64 | + - [TONUMBER](conversion.md/#tonumber) |
| 65 | + |
| 66 | +- [Cryptographic Functions](cryptographic.md) |
| 67 | + - [SHA1](cryptographic.md/#sha1) |
| 68 | + - [SHA2](cryptographic.md/#sha2) |
| 69 | + |
| 70 | +- [Date and Time Functions](datetime.md) |
| 71 | + - [ADDDATE](datetime.md/#adddate) |
| 72 | + - [ADDTIME](datetime.md/#addtime) |
| 73 | + - [CONVERT_TZ](datetime.md/#convert_tz) |
| 74 | + - [CURDATE](datetime.md/#curdate) |
| 75 | + - [CURRENT_DATE](datetime.md/#current_date) |
| 76 | + - [CURRENT_TIME](datetime.md/#current_time) |
| 77 | + - [CURRENT_TIMESTAMP](datetime.md/#current_timestamp) |
| 78 | + - [CURTIME](datetime.md/#curtime) |
| 79 | + - [DATE](datetime.md/#date) |
| 80 | + - [DATE_ADD](datetime.md/#date_add) |
| 81 | + - [DATE_FORMAT](datetime.md/#date_format) |
| 82 | + - [DATETIME](datetime.md/#datetime) |
| 83 | + - [DATE_SUB](datetime.md/#date_sub) |
| 84 | + - [DATEDIFF](datetime.md/#datediff) |
| 85 | + - [DAY](datetime.md/#day) |
| 86 | + - [DAYNAME](datetime.md/#dayname) |
| 87 | + - [DAYOFMONTH](datetime.md/#dayofmonth) |
| 88 | + - [DAY_OF_MONTH](datetime.md/#day_of_month) |
| 89 | + - [DAYOFWEEK](datetime.md/#dayofweek) |
| 90 | + - [DAY_OF_WEEK](datetime.md/#day_of_week) |
| 91 | + - [DAYOFYEAR](datetime.md/#dayofyear) |
| 92 | + - [DAY_OF_YEAR](datetime.md/#day_of_year) |
| 93 | + - [EXTRACT](datetime.md/#extract) |
| 94 | + - [FROM_DAYS](datetime.md/#from_days) |
| 95 | + - [FROM_UNIXTIME](datetime.md/#from_unixtime) |
| 96 | + - [GET_FORMAT](datetime.md/#get_format) |
| 97 | + - [HOUR](datetime.md/#hour) |
| 98 | + - [HOUR_OF_DAY](datetime.md/#hour_of_day) |
| 99 | + - [LAST_DAY](datetime.md/#last_day) |
| 100 | + - [LOCALTIMESTAMP](datetime.md/#localtimestamp) |
| 101 | + - [LOCALTIME](datetime.md/#localtime) |
| 102 | + - [MAKEDATE](datetime.md/#makedate) |
| 103 | + - [MAKETIME](datetime.md/#maketime) |
| 104 | + - [MICROSECOND](datetime.md/#microsecond) |
| 105 | + - [MINUTE](datetime.md/#minute) |
| 106 | + - [MINUTE_OF_HOUR](datetime.md/#minute_of_hour) |
| 107 | + - [MONTH](datetime.md/#month) |
| 108 | + - [MONTH_OF_YEAR](datetime.md/#month_of_year) |
| 109 | + - [MONTHNAME](datetime.md/#monthname) |
| 110 | + - [NOW](datetime.md/#now) |
| 111 | + - [PERIOD_ADD](datetime.md/#period_add) |
| 112 | + - [PERIOD_DIFF](datetime.md/#period_diff) |
| 113 | + - [QUARTER](datetime.md/#quarter) |
| 114 | + - [SEC_TO_TIME](datetime.md/#sec_to_time) |
| 115 | + - [SECOND](datetime.md/#second) |
| 116 | + - [SECOND_OF_MINUTE](datetime.md/#second_of_minute) |
| 117 | + - [STRFTIME](datetime.md/#strftime) |
| 118 | + - [STR_TO_DATE](datetime.md/#str_to_date) |
| 119 | + - [SUBDATE](datetime.md/#subdate) |
| 120 | + - [SUBTIME](datetime.md/#subtime) |
| 121 | + - [SYSDATE](datetime.md/#sysdate) |
| 122 | + - [TIME](datetime.md/#time) |
| 123 | + - [TIME_FORMAT](datetime.md/#time_format) |
| 124 | + - [TIME_TO_SEC](datetime.md/#time_to_sec) |
| 125 | + - [TIMEDIFF](datetime.md/#timediff) |
| 126 | + - [TIMESTAMP](datetime.md/#timestamp) |
| 127 | + - [TIMESTAMPADD](datetime.md/#timestampadd) |
| 128 | + - [TIMESTAMPDIFF](datetime.md/#timestampdiff) |
| 129 | + - [TO_DAYS](datetime.md/#to_days) |
| 130 | + - [TO_SECONDS](datetime.md/#to_seconds) |
| 131 | + - [UNIX_TIMESTAMP](datetime.md/#unix_timestamp) |
| 132 | + - [UTC_DATE](datetime.md/#utc_date) |
| 133 | + - [UTC_TIME](datetime.md/#utc_time) |
| 134 | + - [UTC_TIMESTAMP](datetime.md/#utc_timestamp) |
| 135 | + - [WEEK](datetime.md/#week) |
| 136 | + - [WEEKDAY](datetime.md/#weekday) |
| 137 | + - [WEEK_OF_YEAR](datetime.md/#week_of_year) |
| 138 | + - [YEAR](datetime.md/#year) |
| 139 | + - [YEARWEEK](datetime.md/#yearweek) |
| 140 | + |
| 141 | +- [Expressions](expressions.md) |
| 142 | + - [Arithmetic Operators](expressions.md#arithmetic-operators) |
| 143 | + - [Predicate Operators](expressions.md/#predicate-operators) |
| 144 | + |
| 145 | +- [IP Address Functions](ip.md) |
| 146 | + - [CIDRMATCH](ip.md/#cidrmatch) |
| 147 | + - [GEOIP](ip.md/#geoip) |
| 148 | + |
| 149 | +- [JSON Functions](json.md) |
| 150 | + - [JSON](json.md/#json) |
| 151 | + - [JSON_VALID](json.md/#json_valid) |
| 152 | + - [JSON_OBJECT](json.md/#json_object) |
| 153 | + - [JSON_ARRAY](json.md/#json_array) |
| 154 | + - [JSON_ARRAY_LENGTH](json.md/#json_array_length) |
| 155 | + - [JSON_EXTRACT](json.md/#json_extract) |
| 156 | + - [JSON_DELETE](json.md/#json_delete) |
| 157 | + - [JSON_SET](json.md/#json_set) |
| 158 | + - [JSON_APPEND](json.md/#json_append) |
| 159 | + - [JSON_EXTEND](json.md/#json_extend) |
| 160 | + - [JSON_KEYS](json.md/#json_keys) |
| 161 | + |
| 162 | +- [Mathematical Functions](math.md) |
| 163 | + - [ADD](math.md/#add) |
| 164 | + - [SUBTRACT](math.md/#subtract) |
| 165 | + - [MULTIPLY](math.md/#multiply) |
| 166 | + - [DIVIDE](math.md/#divide) |
| 167 | + - [SUM](math.md/#sum) |
| 168 | + - [AVG](math.md/#avg) |
| 169 | + - [ACOS](math.md/#acos) |
| 170 | + - [ASIN](math.md/#asin) |
| 171 | + - [ATAN](math.md/#atan) |
| 172 | + - [ATAN2](math.md/#atan2) |
| 173 | + - [CEIL](math.md/#ceil) |
| 174 | + - [CEILING](math.md/#ceiling) |
| 175 | + - [CONV](math.md/#conv) |
| 176 | + - [COS](math.md/#cos) |
| 177 | + - [COSH](math.md/#cosh) |
| 178 | + - [COT](math.md/#cot) |
| 179 | + - [CRC32](math.md/#crc32) |
| 180 | + - [DEGREES](math.md/#degrees) |
| 181 | + - [E](math.md/#e) |
| 182 | + - [EXP](math.md/#exp) |
| 183 | + - [EXPM1](math.md/#expm1) |
| 184 | + - [FLOOR](math.md/#floor) |
| 185 | + - [LN](math.md/#ln) |
| 186 | + - [LOG](math.md/#log) |
| 187 | + - [LOG2](math.md/#log2) |
| 188 | + - [LOG10](math.md/#log10) |
| 189 | + - [MOD](math.md/#mod) |
| 190 | + - [MODULUS](math.md/#modulus) |
| 191 | + - [PI](math.md/#pi) |
| 192 | + - [POW](math.md/#pow) |
| 193 | + - [POWER](math.md/#power) |
| 194 | + - [RADIANS](math.md/#radians) |
| 195 | + - [RAND](math.md/#rand) |
| 196 | + - [ROUND](math.md/#round) |
| 197 | + - [SIGN](math.md/#sign) |
| 198 | + - [SIGNUM](math.md/#signum) |
| 199 | + - [SIN](math.md/#sin) |
| 200 | + - [SINH](math.md/#sinh) |
| 201 | + - [SQRT](math.md/#sqrt) |
| 202 | + - [CBRT](math.md/#cbrt) |
| 203 | + - [RINT](math.md/#rint) |
| 204 | + |
| 205 | +- [Relevance Functions](relevance.md) |
| 206 | + - [MATCH](relevance.md/#match) |
| 207 | + - [MATCH_PHRASE](relevance.md/#match_phrase) |
| 208 | + - [MATCH_PHRASE_PREFIX](relevance.md/#match_phrase_prefix) |
| 209 | + - [MULTI_MATCH](relevance.md/#multi_match) |
| 210 | + - [SIMPLE_QUERY_STRING](relevance.md/#simple_query_string) |
| 211 | + - [MATCH_BOOL_PREFIX](relevance.md/#match_bool_prefix) |
| 212 | + - [QUERY_STRING](relevance.md/#query_string) |
| 213 | + |
| 214 | +- [Statistical Functions](statistical.md) |
| 215 | + - [MAX](statistical.md/#max) |
| 216 | + - [MIN](statistical.md/#min) |
| 217 | + |
| 218 | +- [String Functions](string.md) |
| 219 | + - [CONCAT](string.md/#concat) |
| 220 | + - [CONCAT_WS](string.md/#concat_ws) |
| 221 | + - [LENGTH](string.md/#length) |
| 222 | + - [LIKE](string.md/#like) |
| 223 | + - [ILIKE](string.md/#ilike) |
| 224 | + - [LOCATE](string.md/#locate) |
| 225 | + - [LOWER](string.md/#lower) |
| 226 | + - [LTRIM](string.md/#ltrim) |
| 227 | + - [POSITION](string.md/#position) |
| 228 | + - [REPLACE](string.md/#replace) |
| 229 | + - [REVERSE](string.md/#reverse) |
| 230 | + - [RIGHT](string.md/#right) |
| 231 | + - [RTRIM](string.md/#rtrim) |
| 232 | + - [SUBSTRING](string.md/#substring) |
| 233 | + - [TRIM](string.md/#trim) |
| 234 | + - [UPPER](string.md/#upper) |
| 235 | + - [REGEXP_REPLACE](string.md/#regexp_replace) |
| 236 | + |
| 237 | +- [System Functions](system.md) |
| 238 | + - [TYPEOF](system.md/#typeof) |
0 commit comments