Skip to content

Commit

Permalink
Add Exp CSV tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Jul 15, 2024
1 parent fa9bcd7 commit 6b10453
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,19 @@ s:double
25976.0
;

exp#[skip:-8.15.99,reason:new scalar function added in 8.16]
// tag::exp[]
ROW d = 5.5
| EVAL s = EXP(d)
// end::exp[]
;

// tag::exp-result[]
d: double | s:double
5.5 | 244.69193226422038
// end::exp-result[]
;

powHeightSquared
from employees | sort height asc | limit 20 | eval s = round(pow(height, 2) - 2, 2) | keep height, s | sort s desc | limit 4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ synopsis:keyword
"date date_trunc(interval:date_period|time_duration, date:date)"
double e()
"boolean ends_with(str:keyword|text, suffix:keyword|text)"
"double exp(number:double|integer|long|unsigned_long)"
"double|integer|long|unsigned_long floor(number:double|integer|long|unsigned_long)"
"keyword from_base64(string:keyword|text)"
"boolean|double|integer|ip|keyword|long|text|version greatest(first:boolean|double|integer|ip|keyword|long|text|version, ?rest...:boolean|double|integer|ip|keyword|long|text|version)"
Expand Down Expand Up @@ -147,6 +148,7 @@ date_parse |[datePattern, dateString] |["keyword|text", "keyword|te
date_trunc |[interval, date] |["date_period|time_duration", date] |[Interval; expressed using the timespan literal syntax., Date expression]
e |null |null |null
ends_with |[str, suffix] |["keyword|text", "keyword|text"] |[String expression. If `null`\, the function returns `null`., String expression. If `null`\, the function returns `null`.]
exp |number |"double|integer|long|unsigned_long" |Numeric expression. If `null`, the function returns `null`.
floor |number |"double|integer|long|unsigned_long" |Numeric expression. If `null`, the function returns `null`.
from_base64 |string |"keyword|text" |A base64 string.
greatest |first |"boolean|double|integer|ip|keyword|long|text|version" |First of the columns to evaluate.
Expand Down Expand Up @@ -268,6 +270,7 @@ date_parse |Returns a date by parsing the second argument using the format sp
date_trunc |Rounds down a date to the closest interval.
e |Returns {wikipedia}/E_(mathematical_constant)[Euler's number].
ends_with |Returns a boolean that indicates whether a keyword string ends with another string.
exp |Returns the value of e raised to the power of tbe given number.
floor |Round a number down to the nearest integer.
from_base64 |Decode a base64 string.
greatest |Returns the maximum value from multiple columns. This is similar to <<esql-mv_max>> except it is intended to run on multiple columns at once.
Expand Down Expand Up @@ -390,6 +393,7 @@ date_parse |date
date_trunc |date |[false, false] |false |false
e |double |null |false |false
ends_with |boolean |[false, false] |false |false
exp |double |false |false |false
floor |"double|integer|long|unsigned_long" |false |false |false
from_base64 |keyword |false |false |false
greatest |"boolean|double|integer|ip|keyword|long|text|version" |false |true |false
Expand Down Expand Up @@ -493,5 +497,5 @@ countFunctions#[skip:-8.15.99]
meta functions | stats a = count(*), b = count(*), c = count(*) | mv_expand c;

a:long | b:long | c:long
112 | 112 | 112
113 | 113 | 113
;

0 comments on commit 6b10453

Please sign in to comment.