Open nik9000 opened 1 year ago
Pinging @elastic/es-ql (Team:QL)
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)
I wrote up a guide to making new functions about six months ago that's gone stale. I'll try and build another guide for it on Monday.
@nik9000 I had wrote partial logic of 'left' function. Now I wonder how do i write the manual document about it. Furthermore, the variable named 'length' should be optional or mandatory This is my pull request: https://github.com/elastic/elasticsearch/pull/98660
Pinging @elastic/es-analytics-geo (Team:Analytics)
Pinging @elastic/es-analytical-engine (Team:Analytics)
With DATE_EXTRACT
being available I wonder if it still make sense to support many of the functions listed under the DATE
section here.
With
DATE_EXTRACT
being available I wonder if it still make sense to support many of the functions listed under theDATE
section here.
Yeah, I think we probably can just zap them. At most they can be aliases to DATE_EXTRACT. But they aren't nearly as important.
@costin, what do you think of just crossing them out of hte list?
Does TYPEOF
make sense on this list (comparable)? Union types can come up ~when using CASE
(e.g. var0 = CASE(boolField, 1, "foo")
). Also,~ potentially when using multiple indices with different types.
I think TYPEOF
makes a lot of sense with union types. I'd probably want to develop it with some union type work that uses it. And have a look to see if what we need lines up exactly with the sqllite function. If, say, we decide we should have different handling for null
somehow we might not want to name it this. Not that we'd make that decision lightly - conforming to what folks are used to is quite an advantage. But I imagine a world where TYPEOF
is always evaluated at query planning time on the data node.
Description
Description
This is a list of "shovel ready" functions. It's functions we are fairly sure we want and we should be able to start working on them now. This list is not sorted at all, partly because making any one of these functions shouldn't be a huge effort so the cost of having a sorted list is comparatively high.
This list is not sacred. If you need a function to do something, stick it on the list. Maybe even build it yourself, it's fun!
NULL
IP
Math
SUM(a, b, c) - sum of columns, not an aggLet's just usea + b + c
orMV_SUM(a) + MV_SUM(b) + MV_SUM(c)
to_degrees
)to_radians
)String
ROOT
locale. https://github.com/elastic/elasticsearch/pull/104309Date
DATE_PART/DATEPARTfor now folks can use EXTRACTDAY_OF_MONTH/DOM/DAYfor now folks can use EXTRACTDAY_OF_WEEK/DAYOFWEEK/DOWfor now folks can use EXTRACTDAY_OF_YEAR/DOYfor now folks can use EXTRACTHOUR_OF_DAY/HOURfor now folks can use EXTRACTISO_DAY_OF_WEEK/ISODAYOFWEEK/ISODOW/IDOWfor now folks can use EXTRACTISO_WEEK_OF_YEAR/ISOWEEKOFYEAR/ISOWEEK/IWOY/IWfor now folks can use EXTRACTMINUTE_OF_DAYfor now folks can use EXTRACTMINUTE_OF_HOUR/MINUTEfor now folks can use EXTRACTMONTH_OF_YEAR/MONTHfor now folks can use EXTRACTSECOND_OF_MINUTE/SECONDfor now folks can use EXTRACTQUARTERfor now folks can use EXTRACTWEEK_OF_YEAR/WEEKfor now folks can use EXTRACTYEARfor now folks can use EXTRACTEncode/Decode
Secure Hashing
MessageDigest.getInstance
Aggregate (STATS ... BY)