From 0ec4ff83a85113761c15c1b044e3829de28d381b Mon Sep 17 00:00:00 2001 From: Yong Wang Date: Wed, 25 Jan 2023 06:00:33 -0800 Subject: [PATCH] Kusto-phase3: update release note for range() function --- src/Parsers/Kusto/KQL_ReleaseNote.md | 3 +++ .../Kusto/KustoFunctions/KQLDynamicFunctions.cpp | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Parsers/Kusto/KQL_ReleaseNote.md b/src/Parsers/Kusto/KQL_ReleaseNote.md index 8595df7087bf..0a2cbe89249a 100644 --- a/src/Parsers/Kusto/KQL_ReleaseNote.md +++ b/src/Parsers/Kusto/KQL_ReleaseNote.md @@ -3,6 +3,9 @@ # January XX, 2023 ## Functions - [range()](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangefunction) +Difference from ADX: + Return empty array [] if range is empty, while ADX return NULL + The maxamum number of elements of array is 1000000 (limitation of clickhouse), 1,048,576 in ADX ``` print '-- range function int, int, int --'; print range(1, 10, 2); diff --git a/src/Parsers/Kusto/KustoFunctions/KQLDynamicFunctions.cpp b/src/Parsers/Kusto/KustoFunctions/KQLDynamicFunctions.cpp index 5e9799fdec52..d10b99ee6e88 100644 --- a/src/Parsers/Kusto/KustoFunctions/KQLDynamicFunctions.cpp +++ b/src/Parsers/Kusto/KustoFunctions/KQLDynamicFunctions.cpp @@ -356,17 +356,6 @@ bool Zip::convertImpl(String & out, IParser::Pos & pos) bool Range::convertImpl(String & out, IParser::Pos & pos) { - // const auto fn_name = getKQLFunctionName(pos); - // if (fn_name.empty()) - // return false; - return directMapping(out, pos, "kql_range"); - //return directMapping(out, pos, "range"); - /* auto start = getArgument(fn_name, pos); - auto end = getArgument(fn_name, pos); - const auto step = getOptionalArgument(fn_name, pos); - - out = step ? std::format("kql_range({},{},{}))", start, end, step.value()) : std::format("kql_range({},{}))", start, end);*/ - // return true; } }