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 2021/06/04 10:22:47 UTC

[GitHub] [iotdb] LebronAl commented on a change in pull request #3292: [IOTDB-1407] Filtering time series based on tags query fails Occasion…

LebronAl commented on a change in pull request #3292:
URL: https://github.com/apache/iotdb/pull/3292#discussion_r645462119



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/metadata/CMManager.java
##########
@@ -1717,7 +1726,7 @@ public MNode getMNode(MNode deviceMNode, String measurementName) {
               () -> {
                 try {
                   showTimeseries(group, plan, resultSet, context);
-                } catch (CheckConsistencyException e) {
+                } catch (CheckConsistencyException | MetadataException e) {

Review comment:
       I feel like the previous design here was to ignore all MetaExceptions and read as many as we could.
   If we had no intention of changing the design, it would seem pointless to catch this exception?

##########
File path: testcontainer/src/test/java/org/apache/iotdb/db/sql/Cases.java
##########
@@ -220,4 +220,61 @@ public void vectorCountTest() throws IoTDBConnectionException, StatementExecutio
     Assert.assertEquals(10, next.getFields().get(0).getLongV());
     Assert.assertEquals(10, next.getFields().get(1).getLongV());
   }
+
+  // test https://issues.apache.org/jira/browse/IOTDB-1407
+  @Test
+  public void showTimeseriesTagsTest() throws SQLException {
+    String createTimeSeries1 =
+        "create timeseries root.ln.wf01.wt1 WITH DATATYPE=DOUBLE, ENCODING=RLE, compression=SNAPPY tags(tag1=v1, tag2=v2)";
+    String createTimeSeries2 =
+        "create timeseries root.ln.wf01.wt2 WITH DATATYPE=DOUBLE, ENCODING=RLE, compression=SNAPPY tags(tag1=v1, tag2=v2)";
+    writeStatement.execute(createTimeSeries1);
+    writeStatement.execute(createTimeSeries2);
+    // try to read data on each node. select .*
+    for (Statement readStatement : readStatements) {

Review comment:
       what about adding some corner cases,such as `SHOW TIMESERIES root.ln.wf01.* where tag1=v3`, `HOW TIMESERIES root.ln.wf01.* where tag3=v1`




-- 
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.

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