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/05/18 09:24:16 UTC

[GitHub] [iotdb] ijihang opened a new pull request #3219: add query last data interface

ijihang opened a new pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219


   ## Description
   When the user queries for the latest value,we hope skip sql sql parser,
   i add last data query interface in session according to raw data query.
   This is jira : https://issues.apache.org/jira/browse/IOTDB-670


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



[GitHub] [iotdb] mychaow merged pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
mychaow merged pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219


   


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



[GitHub] [iotdb] neuyilan commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
neuyilan commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-846875214


   > > Only some minor issues, PTAL
   > > Besides, have you tested in the cluster version?
   > 
   > only test stand-alone ,i think should be same
   
   Please add one cluster IT test in the testcontainer module, it's better to use automated testing to ensure correctness than we think. In this way, if the subsequent developers modify the code by mistake, they can have automatic tests to check it out.


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



[GitHub] [iotdb] Alima777 commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
Alima777 commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r642870584



##########
File path: thrift/src/main/thrift/rpc.thrift
##########
@@ -291,6 +291,16 @@ struct TSRawDataQueryReq {
   7: optional bool enableRedirectQuery;
 }
 
+struct TSLastDataQueryReq {
+  1: required i64 sessionId
+  2: required list<string> suffixPath
+  3: required list<string> prefixPath

Review comment:
       Thank you~ :D




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



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852123146


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852083316


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852083316


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852170956


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] coveralls edited a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851887295


   
   [![Coverage Status](https://coveralls.io/builds/40200927/badge)](https://coveralls.io/builds/40200927)
   
   Coverage decreased (-0.2%) to 67.924% when pulling **0a938478a6e0b3fe5c5afdbd902505e475177c08 on ijihang:fix_querylastdata** into **bd1d1a67e77b3ba42d92e92ca4275e2d916abf3c on apache:master**.
   


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



[GitHub] [iotdb] coveralls commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851887295


   
   [![Coverage Status](https://coveralls.io/builds/40192062/badge)](https://coveralls.io/builds/40192062)
   
   Coverage decreased (-0.2%) to 67.889% when pulling **7b8c4af00ba67d0bba6e651fa44f29b0ee11e417 on ijihang:fix_querylastdata** into **bd1d1a67e77b3ba42d92e92ca4275e2d916abf3c on apache:master**.
   


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



[GitHub] [iotdb] coveralls edited a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851887295


   
   [![Coverage Status](https://coveralls.io/builds/40228232/badge)](https://coveralls.io/builds/40228232)
   
   Coverage increased (+0.02%) to 67.921% when pulling **0211cbfc97d80771c85e4d9dcc8c761769e9ec1a on ijihang:fix_querylastdata** into **622a9c412e51d45b28325ebf0b3d89b22ef7aaae on apache:master**.
   


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



[GitHub] [iotdb] ijihang commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r636788967



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -589,6 +589,47 @@ public SessionDataSet executeRawDataQuery(List<String> paths, long startTime, lo
     }
   }
 
+  /**
+   * only: select last status from root.ln.wf01.wt01 where time >= 1621326244168; <PrefixPath> +
+   * <suffixPath> = <TimeSeries>
+   *
+   * @param suffixPath root.ln.wf01.wt01
+   * @param prefixPath status

Review comment:
       ok ,Has been modified and submitted




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



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852081827


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] Alima777 commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
Alima777 commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r643085539



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanner.java
##########
@@ -60,4 +62,18 @@ public PhysicalPlan rawDataQueryReqToPhysicalPlan(
     return new ClusterPhysicalGenerator()
         .transformToPhysicalPlan(operator, rawDataQueryReq.fetchSize);
   }
+
+  @Override
+  public PhysicalPlan lastDataQueryReqToPhysicalPlan(
+      TSLastDataQueryReq lastDataQueryReq, ZoneId zoneId)
+      throws QueryProcessException, IllegalPathException {
+    // from TSLastDataQueryReq to logical operator
+    Operator operator = LogicalGenerator.generate(lastDataQueryReq, zoneId);
+    // check if there are logical errors
+    LogicalChecker.check(operator);
+    // optimize the logical operator
+    operator = logicalOptimize(operator, lastDataQueryReq.fetchSize);
+    // from logical operator to physical plan
+    return new PhysicalGenerator().transformToPhysicalPlan(operator, lastDataQueryReq.fetchSize);

Review comment:
       ```suggestion
       return new ClusterPhysicalGenerator().transformToPhysicalPlan(operator, lastDataQueryReq.fetchSize);
   ```




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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851889347


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] neuyilan commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
neuyilan commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r636577471



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -589,6 +589,47 @@ public SessionDataSet executeRawDataQuery(List<String> paths, long startTime, lo
     }
   }
 
+  /**
+   * only: select last status from root.ln.wf01.wt01 where time >= 1621326244168; <PrefixPath> +
+   * <suffixPath> = <TimeSeries>
+   *
+   * @param suffixPath root.ln.wf01.wt01
+   * @param prefixPath status

Review comment:
       Change the comment to a reasonable one, we should first explain the param's meaning and then we can give some examples.

##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -589,6 +589,47 @@ public SessionDataSet executeRawDataQuery(List<String> paths, long startTime, lo
     }
   }
 
+  /**
+   * only: select last status from root.ln.wf01.wt01 where time >= 1621326244168; <PrefixPath> +
+   * <suffixPath> = <TimeSeries>
+   *
+   * @param suffixPath root.ln.wf01.wt01
+   * @param prefixPath status
+   * @param LastTime get the last data,whose timestamp greater than or equal LastTime
+   */
+  public SessionDataSet executeLastDataQuery(
+      List<String> suffixPath, List<String> prefixPath, long LastTime)
+      throws StatementExecutionException, IoTDBConnectionException {
+    try {
+      return defaultSessionConnection.executeLastDataQuery(suffixPath, prefixPath, LastTime);
+    } catch (RedirectException e) {
+      handleQueryRedirection(e.getEndPoint());
+      if (enableQueryRedirection) {
+        // retry
+        try {
+          return defaultSessionConnection.executeLastDataQuery(suffixPath, prefixPath, LastTime);
+        } catch (RedirectException redirectException) {
+          logger.error("redirect twice", redirectException);
+          throw new StatementExecutionException("redirect twice, please try again.");
+        }
+      } else {
+        throw new StatementExecutionException(MSG_DONOT_ENABLE_REDIRECT);
+      }
+    }
+  }
+
+  /**
+   * query eg. select last status from root.ln.wf01.wt01; <PrefixPath> + <suffixPath> = <TimeSeries>
+   *
+   * @param suffixPath query statement
+   * @param prefixPath query statement

Review comment:
       The same as above,  if we provide the params, we should explain the params correctly.  




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



[GitHub] [iotdb] ijihang commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r642818660



##########
File path: testcontainer/src/test/java/org/apache/iotdb/db/sql/Cases.java
##########
@@ -220,4 +220,71 @@ public void vectorCountTest() throws IoTDBConnectionException, StatementExecutio
     Assert.assertEquals(10, next.getFields().get(0).getLongV());
     Assert.assertEquals(10, next.getFields().get(1).getLongV());
   }
+
+  @Test
+  public void clusterLastQueryTest() throws IoTDBConnectionException, StatementExecutionException {
+
+    session.setStorageGroup("root.sg1");
+    session.createTimeseries(
+        "root.sg1.d2.s1", TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY);
+    session.createTimeseries(
+        "root.sg1.d2.s2", TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY);
+
+    insertRecords();
+
+    List<String> suffixPath = new ArrayList<>();
+    List<String> prefixPath = new ArrayList<>();
+
+    suffixPath.add("s1");
+    suffixPath.add("s2");
+    prefixPath.add("root.sg1.d2");
+
+    SessionDataSet sessionDataSet = session.executeLastDataQuery(suffixPath, prefixPath);
+    sessionDataSet.setFetchSize(1024);
+
+    int count = 0;
+    while (sessionDataSet.hasNext()) {
+      count++;
+    }
+    Assert.assertEquals(2, count);

Review comment:
       ok,the new commit add




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



[GitHub] [iotdb] mychaow merged pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
mychaow merged pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219


   


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



[GitHub] [iotdb] ijihang commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-845827628


   > Only some minor issues, PTAL
   > Besides, have you tested in the cluster version?
   
   only test stand-alone ,i think  should be  same


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



[GitHub] [iotdb] mychaow commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
mychaow commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r643069262



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanner.java
##########
@@ -60,4 +62,18 @@ public PhysicalPlan rawDataQueryReqToPhysicalPlan(
     return new ClusterPhysicalGenerator()
         .transformToPhysicalPlan(operator, rawDataQueryReq.fetchSize);
   }
+
+  @Override
+  public PhysicalPlan lastDataQueryReqToPhysicalPlan(

Review comment:
       Why do you need to override the method?




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



[GitHub] [iotdb] Alima777 commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
Alima777 commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r642306665



##########
File path: thrift/src/main/thrift/rpc.thrift
##########
@@ -291,6 +291,16 @@ struct TSRawDataQueryReq {
   7: optional bool enableRedirectQuery;
 }
 
+struct TSLastDataQueryReq {
+  1: required i64 sessionId
+  2: required list<string> suffixPath
+  3: required list<string> prefixPath

Review comment:
       Sorry, I don't quite get your meaning. 
   1. Now you define the user interface which need suffixPath and prefixPath both, the user will have to give two arrays, which is more complex and not intuitive enough. 
   For example, I want query `s1` of device `root.sg.d1` and `root.sg.d2`, the sql will be like:
   `select last s1 from root.sg.d1, root.sg.d2`.
   suffixPath = {s1}, prefixPath = {root.sg.d1, root.sg.d2}.
   But intuitively speaking, when calling the session interface, I just give any path I want to query. e.g.
   completePath = {root.sg.d1.s1, root.sg.d2.s1}.
   
   2. And it's limited in function.
   For exmaple, if I want to get `s1` and `s2` of device `root.sg.d1`, and just `s1` of device `root.sg.d2`.
   You can't write the correct suffix array directly in your way, right?
   




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



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851889347


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] ijihang commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r641433535



##########
File path: thrift/src/main/thrift/rpc.thrift
##########
@@ -291,6 +291,16 @@ struct TSRawDataQueryReq {
   7: optional bool enableRedirectQuery;
 }
 
+struct TSLastDataQueryReq {
+  1: required i64 sessionId
+  2: required list<string> suffixPath
+  3: required list<string> prefixPath

Review comment:
       Yes, this is to increase user convenience. If we write the full path, we will write more




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



[GitHub] [iotdb] ijihang commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r643012023



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/Planner.java
##########
@@ -139,6 +140,40 @@ public PhysicalPlan rawDataQueryReqToPhysicalPlan(
     return physicalGenerator.transformToPhysicalPlan(op, rawDataQueryReq.fetchSize);
   }
 
+  /** convert last data query to physical plan directly */
+  public PhysicalPlan lastDataQueryReqToPhysicalPlan(TSLastDataQueryReq req, ZoneId zoneId)
+      throws QueryProcessException, IllegalPathException {
+    List<String> paths = req.getPaths();
+    long time = req.getTime();
+
+    SelectOperator selectOp = new SelectOperator(SQLConstant.TOK_SELECT, zoneId);
+    FromOperator fromOp = new FromOperator(SQLConstant.TOK_FROM);
+    QueryOperator queryOp = new QueryOperator(SQLConstant.TOK_QUERY);
+
+    selectOp.setLastQuery();
+    selectOp.addSelectPath(new PartialPath(""));
+
+    for (String p : paths) {
+      PartialPath path = new PartialPath(p);
+      fromOp.addPrefixTablePath(path);
+    }
+
+    queryOp.setSelectOperator(selectOp);
+    queryOp.setFromOperator(fromOp);
+
+    PartialPath timePath = new PartialPath(TIME);
+
+    BasicFunctionOperator basicFunctionOperator =
+        new BasicFunctionOperator(SQLConstant.GREATERTHANOREQUALTO, timePath, Long.toString(time));
+    queryOp.setFilterOperator(basicFunctionOperator);
+
+    int maxDeduplicatedPathNum = Integer.MAX_VALUE - 1;
+    Operator op = logicalOptimize(queryOp, maxDeduplicatedPathNum);
+
+    PhysicalGenerator physicalGenerator = new PhysicalGenerator();
+    return physicalGenerator.transformToPhysicalPlan(op, req.fetchSize);
+  }

Review comment:
       Yes, I saw the master modify part of the code ,so i submit a new one




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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852123146


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] ijihang commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r642818394



##########
File path: thrift/src/main/thrift/rpc.thrift
##########
@@ -291,6 +291,16 @@ struct TSRawDataQueryReq {
   7: optional bool enableRedirectQuery;
 }
 
+struct TSLastDataQueryReq {
+  1: required i64 sessionId
+  2: required list<string> suffixPath
+  3: required list<string> prefixPath

Review comment:
       Yes, you are right, so I submitted a new commit to modify the time series to full path




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



[GitHub] [iotdb] neuyilan commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
neuyilan commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r642250429



##########
File path: testcontainer/src/test/java/org/apache/iotdb/db/sql/Cases.java
##########
@@ -220,4 +220,71 @@ public void vectorCountTest() throws IoTDBConnectionException, StatementExecutio
     Assert.assertEquals(10, next.getFields().get(0).getLongV());
     Assert.assertEquals(10, next.getFields().get(1).getLongV());
   }
+
+  @Test
+  public void clusterLastQueryTest() throws IoTDBConnectionException, StatementExecutionException {
+
+    session.setStorageGroup("root.sg1");
+    session.createTimeseries(
+        "root.sg1.d2.s1", TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY);
+    session.createTimeseries(
+        "root.sg1.d2.s2", TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY);
+
+    insertRecords();
+
+    List<String> suffixPath = new ArrayList<>();
+    List<String> prefixPath = new ArrayList<>();
+
+    suffixPath.add("s1");
+    suffixPath.add("s2");
+    prefixPath.add("root.sg1.d2");
+
+    SessionDataSet sessionDataSet = session.executeLastDataQuery(suffixPath, prefixPath);
+    sessionDataSet.setFetchSize(1024);
+
+    int count = 0;
+    while (sessionDataSet.hasNext()) {
+      count++;
+    }
+    Assert.assertEquals(2, count);

Review comment:
       The same as above.

##########
File path: session/src/test/java/org/apache/iotdb/session/IoTDBSessionComplexIT.java
##########
@@ -594,6 +608,25 @@ private void rawDataQuery() throws StatementExecutionException, IoTDBConnectionE
     sessionDataSet.closeOperationHandle();
   }
 
+  private void lastDataQuery() throws StatementExecutionException, IoTDBConnectionException {
+    List<String> suffixPath = new ArrayList<>();
+    List<String> prefixPath = new ArrayList<>();
+
+    suffixPath.add("s1");
+    suffixPath.add("s2");
+    prefixPath.add("root.sg1.d2");
+
+    SessionDataSet sessionDataSet = session.executeLastDataQuery(suffixPath, prefixPath);
+    sessionDataSet.setFetchSize(1024);
+
+    int count = 0;
+    while (sessionDataSet.hasNext()) {
+      count++;
+    }
+    Assert.assertEquals(2, count);

Review comment:
       As we control the insert of the records, it would be better to add one assert that can make sure the value of the two measurements.




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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852730554


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] ijihang edited a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang edited a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-844870966


   insert 100w timeseries
   Test:   no sql parse:45ms,have sql parse:125ms
   ![image](https://user-images.githubusercontent.com/55303647/118948201-a3d1e780-b98a-11eb-81b5-47ee3cbbc615.png)
   when have time filter ,The results are similar
   


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



[GitHub] [iotdb] Alima777 commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
Alima777 commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r642875897



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/Planner.java
##########
@@ -139,6 +140,40 @@ public PhysicalPlan rawDataQueryReqToPhysicalPlan(
     return physicalGenerator.transformToPhysicalPlan(op, rawDataQueryReq.fetchSize);
   }
 
+  /** convert last data query to physical plan directly */
+  public PhysicalPlan lastDataQueryReqToPhysicalPlan(TSLastDataQueryReq req, ZoneId zoneId)
+      throws QueryProcessException, IllegalPathException {
+    List<String> paths = req.getPaths();
+    long time = req.getTime();
+
+    SelectOperator selectOp = new SelectOperator(SQLConstant.TOK_SELECT, zoneId);
+    FromOperator fromOp = new FromOperator(SQLConstant.TOK_FROM);
+    QueryOperator queryOp = new QueryOperator(SQLConstant.TOK_QUERY);
+
+    selectOp.setLastQuery();
+    selectOp.addSelectPath(new PartialPath(""));

Review comment:
       The data structure of select opeartor was changed, since a PR modified it was merged before. You can see `generate(TSRawDataQueryReq rawDataQueryReq, ZoneId zoneId)` for reference.
   
   ```suggestion
       selectOp.setLastQuery();
       selectOp.addResultColumn(new ResultColumn(new TimeSeriesOperand(new PartialPath(""))));
   ```

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/Planner.java
##########
@@ -139,6 +140,40 @@ public PhysicalPlan rawDataQueryReqToPhysicalPlan(
     return physicalGenerator.transformToPhysicalPlan(op, rawDataQueryReq.fetchSize);
   }
 
+  /** convert last data query to physical plan directly */
+  public PhysicalPlan lastDataQueryReqToPhysicalPlan(TSLastDataQueryReq req, ZoneId zoneId)
+      throws QueryProcessException, IllegalPathException {
+    List<String> paths = req.getPaths();
+    long time = req.getTime();
+
+    SelectOperator selectOp = new SelectOperator(SQLConstant.TOK_SELECT, zoneId);
+    FromOperator fromOp = new FromOperator(SQLConstant.TOK_FROM);
+    QueryOperator queryOp = new QueryOperator(SQLConstant.TOK_QUERY);
+
+    selectOp.setLastQuery();
+    selectOp.addSelectPath(new PartialPath(""));
+
+    for (String p : paths) {
+      PartialPath path = new PartialPath(p);
+      fromOp.addPrefixTablePath(path);
+    }
+
+    queryOp.setSelectOperator(selectOp);
+    queryOp.setFromOperator(fromOp);
+
+    PartialPath timePath = new PartialPath(TIME);
+
+    BasicFunctionOperator basicFunctionOperator =
+        new BasicFunctionOperator(SQLConstant.GREATERTHANOREQUALTO, timePath, Long.toString(time));
+    queryOp.setFilterOperator(basicFunctionOperator);
+
+    int maxDeduplicatedPathNum = Integer.MAX_VALUE - 1;
+    Operator op = logicalOptimize(queryOp, maxDeduplicatedPathNum);
+
+    PhysicalGenerator physicalGenerator = new PhysicalGenerator();
+    return physicalGenerator.transformToPhysicalPlan(op, req.fetchSize);
+  }

Review comment:
       A easy-fix problem is: you can see `rawDataQueryReqToPhysicalPlan`, the code logic is abstracted and very clear, we hope you can keep this code structure.




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



[GitHub] [iotdb] Alima777 commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
Alima777 commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r637760212



##########
File path: thrift/src/main/thrift/rpc.thrift
##########
@@ -291,6 +291,16 @@ struct TSRawDataQueryReq {
   7: optional bool enableRedirectQuery;
 }
 
+struct TSLastDataQueryReq {
+  1: required i64 sessionId
+  2: required list<string> suffixPath
+  3: required list<string> prefixPath

Review comment:
       Just give the complete path, now that we use session, we don't need to concat the path again.

##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -589,6 +589,48 @@ public SessionDataSet executeRawDataQuery(List<String> paths, long startTime, lo
     }
   }
 
+  /**
+   * only: select last status from root.ln.wf01.wt01 where time >= 1621326244168; must satisfy
+   * <PrefixPath> + <suffixPath> = <TimeSeries>
+   *
+   * @param suffixPath the timeSeries suffix. eg. root.ln.wf01.wt01
+   * @param prefixPath the timeSeries prefix. eg. status
+   * @param LastTime get the last data,whose timestamp greater than or equal LastTime eg.
+   *     1621326244168

Review comment:
       ```suggestion
      * @param LastTime get the last data, whose timestamp greater than or equal LastTime eg.
      *     1621326244168
   ```




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



[GitHub] [iotdb] ijihang commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-848408835


   add cluster test lastDataQuery ,and  modify Dockerfile, Because the package is compiled in Windows system and then run into docker, the file format needs to be modified


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



[GitHub] [iotdb] coveralls edited a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851887295


   
   [![Coverage Status](https://coveralls.io/builds/40202615/badge)](https://coveralls.io/builds/40202615)
   
   Coverage increased (+0.02%) to 67.921% when pulling **3dddf12e8decc8e646b0d946b5f35f2f6a71b6cd on ijihang:fix_querylastdata** into **622a9c412e51d45b28325ebf0b3d89b22ef7aaae on apache:master**.
   


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



[GitHub] [iotdb] ijihang commented on a change in pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on a change in pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#discussion_r643079106



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanner.java
##########
@@ -60,4 +62,18 @@ public PhysicalPlan rawDataQueryReqToPhysicalPlan(
     return new ClusterPhysicalGenerator()
         .transformToPhysicalPlan(operator, rawDataQueryReq.fetchSize);
   }
+
+  @Override
+  public PhysicalPlan lastDataQueryReqToPhysicalPlan(

Review comment:
       ClusterPlanner extends Planner,i  add lastDataQueryReqToPhysicalPlan in Planner 




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



[GitHub] [iotdb] ijihang commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
ijihang commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-844870966


   insert 100w timeseries
   Test:   no sql parse:45ms,have sql parse:125ms
   ![image](https://user-images.githubusercontent.com/55303647/118948201-a3d1e780-b98a-11eb-81b5-47ee3cbbc615.png)
   


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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852170956


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-852081827


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3219&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=coverage&view=list) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo.png' alt='No Duplication information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3219&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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



[GitHub] [iotdb] coveralls edited a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851887295


   
   [![Coverage Status](https://coveralls.io/builds/40200861/badge)](https://coveralls.io/builds/40200861)
   
   Coverage decreased (-0.2%) to 67.917% when pulling **0a938478a6e0b3fe5c5afdbd902505e475177c08 on ijihang:fix_querylastdata** into **bd1d1a67e77b3ba42d92e92ca4275e2d916abf3c on apache:master**.
   


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



[GitHub] [iotdb] coveralls edited a comment on pull request #3219: add query last data interface

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3219:
URL: https://github.com/apache/iotdb/pull/3219#issuecomment-851887295


   
   [![Coverage Status](https://coveralls.io/builds/40204927/badge)](https://coveralls.io/builds/40204927)
   
   Coverage increased (+0.01%) to 67.917% when pulling **2f343c9d3c74e050e8e522e3ff1b01b06fafbd32 on ijihang:fix_querylastdata** into **622a9c412e51d45b28325ebf0b3d89b22ef7aaae on apache:master**.
   


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