From 0101abf9cea7ce051d1e638830e3704ddb432c47 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 831969bbe5cd..781945702112 100644 --- a/langlib/lang.query/src/main/ballerina/types.bal +++ b/langlib/lang.query/src/main/ballerina/types.bal @@ -674,9 +674,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; }