Skip to content

Commit

Permalink
Kusto-phase: fix the kql array_sort subscript issue if the identifier…
Browse files Browse the repository at this point in the history
… is not a function
  • Loading branch information
kashwy committed Dec 9, 2022
1 parent 9c177e3 commit 5887f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parsers/ExpressionListParsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ class Layer
}
else if (first_arg_as_node->name == "arrayElement" && !first_arg_as_node->arguments->children.empty())
{
auto &arg_name_inside = first_arg_as_node->arguments->children[0]->as<ASTFunction>()->name;
if (arg_name_inside == "kql_array_sort_asc" || arg_name_inside == "kql_array_sort_desc")
auto arg_inside = first_arg_as_node->arguments->children[0]->as<ASTFunction>();
if (arg_inside && (arg_inside->name == "kql_array_sort_asc" || arg_inside->name == "kql_array_sort_desc"))
first_arg_as_node->name = "tupleElement";
}
}
Expand Down

0 comments on commit 5887f79

Please sign in to comment.