You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/10/26 08:58:30 UTC

[GitHub] [iotdb] RYH61 commented on a diff in pull request #7736: [IOTDB-4695] GROUP LEVEL query de-duplicates result columns unexpected

RYH61 commented on code in PR #7736:
URL: https://github.com/apache/iotdb/pull/7736#discussion_r1005409804


##########
integration-test/src/test/java/org/apache/iotdb/db/it/aggregation/IoTDBAggregationByLevelIT.java:
##########
@@ -674,6 +675,25 @@ public void TestGroupByLevelWithoutAggregationFunc() {
     }
   }
 
+  @Test
+  public void groupByLevelWithSameColumn() throws SQLException {
+    String[] retArray = new String[] {"8", "8"};
+    try (Connection connection = EnvFactory.getEnv().getConnection();
+        Statement statement = connection.createStatement()) {
+
+      int cnt = 0;
+      try (ResultSet resultSet =
+          statement.executeQuery(
+              "select count(status),count(status) from root.*.* GROUP BY level=0")) {
+        while (resultSet.next()) {
+          String ans = resultSet.getString(count("root.*.*.status"));

Review Comment:
   `String[] retArray = new String[] {"8", "8"};`
   
   The results that already contain two columns should be changed here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org