From 50830bd10e757c79807f62e1b71685cb86a24d3e Mon Sep 17 00:00:00 2001 From: Yong Wang Date: Fri, 26 Aug 2022 07:09:32 -0700 Subject: [PATCH] Kusto-phase2: update and format release note. --- src/Parsers/Kusto/KQL_ReleaseNote.md | 55 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/src/Parsers/Kusto/KQL_ReleaseNote.md b/src/Parsers/Kusto/KQL_ReleaseNote.md index 87e9a0a3727..0a524bd2d5b 100644 --- a/src/Parsers/Kusto/KQL_ReleaseNote.md +++ b/src/Parsers/Kusto/KQL_ReleaseNote.md @@ -2,30 +2,6 @@ ## KQL implemented features # August 29, 2022 -## Dynamic Array Functions -**Below functions only support the constant dynamic array** -- [array_sort_asc](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arraysortascfunction) - `print t = array_sort_asc(dynamic([null, 'd', 'a', 'c', 'c']))` - `print t = array_sort_asc(dynamic([4, 1, 3, 2]))` - `print array_sort_asc(dynamic(['b', 'a', 'c']), dynamic([20, 10, 30]))` - `print array_sort_asc(dynamic([2, 1, 3]), dynamic(['clickhouse','hello', 'world']))` - `print t = array_sort_asc( dynamic(['d', null, 'a', 'c', 'c']) , false)` - `print t = array_sort_asc( dynamic(['d', null, 'a', 'c', 'c']) , 1 > 2)` - `print t = array_sort_asc( dynamic([null, 'd', null, null, 'a', 'c', 'c', null, null, null]) , false)` - `print t = array_sort_asc( dynamic([null, null, null]) , false)` - `print array_sort_asc(dynamic([2, 1, null,3, null]), dynamic([20, 10, 40, 30, 50]), 1 > 2)` - `print array_sort_asc(dynamic([2, 1, null,3, null]), dynamic([20, 10, 40, 30, 50, 3]), 1 > 2)` -- [array_sort_desc](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arraysortdescfunction) - `print t = array_sort_desc(dynamic([null, 'd', 'a', 'c', 'c']))` - `print t = array_sort_desc(dynamic([4, 1, 3, 2]))` - `print array_sort_desc(dynamic(['b', 'a', 'c']), dynamic([20, 10, 30]))` - `print array_sort_desc(dynamic([2, 1, 3]), dynamic(['clickhouse','hello', 'world']))` - `print t = array_sort_desc( dynamic(['d', null, 'a', 'c', 'c']) , 1 < 2)` - `print t = array_sort_desc( dynamic(['d', null, 'a', 'c', 'c']) , false)` - `print t = array_sort_desc( dynamic([null, 'd', null, null, 'a', 'c', 'c', null, null, null]) , false)` - `print t = array_sort_desc( dynamic([null, null, null]) , false)` - `print array_sort_desc(dynamic([2, 1, null,3, null]), dynamic([20, 10, 40, 30, 50]), 1 > 2)` -## Aggregate Functions ## **make-series operator** https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/make-seriesoperator @@ -158,6 +134,31 @@ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/make-seriesoper `DataTable | summarize t = percentilew(Bucket, Frequency, 50)` ## Dynamic functions +- [array_sort_asc](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arraysortascfunction) + **(only support the constant dynamic array)** + `print t = array_sort_asc(dynamic([null, 'd', 'a', 'c', 'c']))` + `print t = array_sort_asc(dynamic([4, 1, 3, 2]))` + `print array_sort_asc(dynamic(['b', 'a', 'c']), dynamic([20, 10, 30]))` + `print array_sort_asc(dynamic([2, 1, 3]), dynamic(['clickhouse','hello', 'world']))` + `print t = array_sort_asc( dynamic(['d', null, 'a', 'c', 'c']) , false)` + `print t = array_sort_asc( dynamic(['d', null, 'a', 'c', 'c']) , 1 > 2)` + `print t = array_sort_asc( dynamic([null, 'd', null, null, 'a', 'c', 'c', null, null, null]) , false)` + `print t = array_sort_asc( dynamic([null, null, null]) , false)` + `print array_sort_asc(dynamic([2, 1, null,3, null]), dynamic([20, 10, 40, 30, 50]), 1 > 2)` + `print array_sort_asc(dynamic([2, 1, null,3, null]), dynamic([20, 10, 40, 30, 50, 3]), 1 > 2)` + +- [array_sort_desc](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arraysortdescfunction) **(only support the constant dynamic array)** + + `print t = array_sort_desc(dynamic([null, 'd', 'a', 'c', 'c']))` + `print t = array_sort_desc(dynamic([4, 1, 3, 2]))` + `print array_sort_desc(dynamic(['b', 'a', 'c']), dynamic([20, 10, 30]))` + `print array_sort_desc(dynamic([2, 1, 3]), dynamic(['clickhouse','hello', 'world']))` + `print t = array_sort_desc( dynamic(['d', null, 'a', 'c', 'c']) , 1 < 2)` + `print t = array_sort_desc( dynamic(['d', null, 'a', 'c', 'c']) , false)` + `print t = array_sort_desc( dynamic([null, 'd', null, null, 'a', 'c', 'c', null, null, null]) , false)` + `print t = array_sort_desc( dynamic([null, null, null]) , false)` + `print array_sort_desc(dynamic([2, 1, null,3, null]), dynamic([20, 10, 40, 30, 50]), 1 > 2)` + - [array_concat](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/arrayconcatfunction) `print array_concat(dynamic([1, 2, 3]), dynamic([4, 5]), dynamic([6, 7, 8, 9])) == dynamic([1, 2, 3, 4, 5, 6, 7, 8, 9])` @@ -226,15 +227,15 @@ https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/make-seriesoper - [datetime_add] (https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/datetime-addfunction) `print datetime_add('day',1,datetime(2017-10-30 01:02:03.7654321))` --[format_timespan] (https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/format-timespanfunction) +- [format_timespan] (https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/format-timespanfunction) `print format_timespan(time(1d), 'd-[hh:mm:ss]')` `print format_timespan(time('12:30:55.123'), 'ddddd-[hh:mm:ss.ffff]')` --[format_datetime](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction) +- [format_datetime](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction) `print format_datetime(todatetime('2009-06-15T13:45:30.6175425'), 'yy-M-dd [H:mm:ss.fff]')` `print format_datetime(datetime(2015-12-14 02:03:04.12345), 'y-M-d h:m:s tt')` --[todatetime] (https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/todatetimefunction) +- [todatetime](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/todatetimefunction) `print todatetime('2014-05-25T08:20:03.123456Z')` `print todatetime('2014-05-25 20:03.123')`