This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 323b21e3674 Make deserialize of AggregationDescriptor AttributesMap
use LinkedHashMap
323b21e3674 is described below
commit 323b21e3674c78b0104519abdf0ac3a8ef1d26a3
Author: Weihao Li <[email protected]>
AuthorDate: Fri Apr 18 09:06:00 2025 +0800
Make deserialize of AggregationDescriptor AttributesMap use LinkedHashMap
---
.../org/apache/iotdb/db/it/aggregation/IoTDBCountIfIT.java | 13 +++++++++++++
.../plan/planner/plan/parameter/AggregationDescriptor.java | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBCountIfIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBCountIfIT.java
index c5cd96aac00..3f45ccdd58f 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBCountIfIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBCountIfIT.java
@@ -208,6 +208,19 @@ public class IoTDBCountIfIT {
resultSetEqualTest("select Count_if(s3, 1) from root.db.d1",
expectedHeader, retArray);
}
+ @Test
+ public void testMultiAttributes() {
+ String[] expectedHeader =
+ new String[] {
+ "Count_if(root.db.d1.s3, 1, \"attr1\"=\"1\", \"attr2\"=\"2\",
\"attr3\"=\"3\")"
+ };
+ String[] retArray = new String[] {"1,"};
+ resultSetEqualTest(
+ "select Count_if(s3, 1,
\"attr1\"=\"1\",\"attr2\"=\"2\",\"attr3\"=\"3\") from root.db.d1",
+ expectedHeader,
+ retArray);
+ }
+
@Test
public void testContIfWithGroupByLevel() {
String[] expectedHeader = new String[] {"Count_if(root.db.*.s1 = 0 &
root.db.*.s2 = 0, 3)"};
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/AggregationDescriptor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/AggregationDescriptor.java
index 00eabcbeee5..ac30dcf505a 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/AggregationDescriptor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/AggregationDescriptor.java
@@ -332,7 +332,7 @@ public class AggregationDescriptor {
inputExpressions.add(Expression.deserialize(byteBuffer));
inputExpressionsSize--;
}
- Map<String, String> inputAttributes = ReadWriteIOUtils.readMap(byteBuffer);
+ Map<String, String> inputAttributes =
ReadWriteIOUtils.readLinkedHashMap(byteBuffer);
return new AggregationDescriptor(aggregationFuncName, step,
inputExpressions, inputAttributes);
}