From d23937913e8b4d947a540102bb582fd9ca5ddb06 Mon Sep 17 00:00:00 2001 From: gimantha Date: Thu, 28 Nov 2024 16:26:36 +0530 Subject: [PATCH] Change arrays to maps for keeping the grouping keys in query expressions --- langlib/lang.query/src/main/ballerina/types.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langlib/lang.query/src/main/ballerina/types.bal b/langlib/lang.query/src/main/ballerina/types.bal index 980f0f8efd10..96ff7d11cbf4 100644 --- a/langlib/lang.query/src/main/ballerina/types.bal +++ b/langlib/lang.query/src/main/ballerina/types.bal @@ -680,9 +680,9 @@ class _GroupByFunction { } private function getKey(_Frame f) returns anydata|error { - anydata[] keys = []; + record{} keys = {}; foreach var key in self.keys { - keys.push( check f[key]); + keys[key] = check f[key]; } return keys; }