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 2020/11/20 03:45:04 UTC

[GitHub] [iotdb] haimeiguo opened a new pull request #2087: SDT implementation

haimeiguo opened a new pull request #2087:
URL: https://github.com/apache/iotdb/pull/2087


   implements SDT in chunk writer. data gets discarded when "flush" in memory before going to disk.
   (working on unit test)


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/is
 sues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [63 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.3%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.3% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/is
 sues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [63 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.3%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.3% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [28 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] haimeiguo commented on a change in pull request #2087: [IOTDB-890] SDT implementation

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



##########
File path: antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
##########
@@ -1272,6 +1268,8 @@ UNDERLINE : '_';
 
 NaN : 'NaN';
 
+SDT : 'SDT';

Review comment:
       removed. thank you!
   




----------------------------------------------------------------
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] Genius-pig commented on a change in pull request #2087: [IOTDB-890] SDT implementation

Posted by GitBox <gi...@apache.org>.
Genius-pig commented on a change in pull request #2087:
URL: https://github.com/apache/iotdb/pull/2087#discussion_r528592881



##########
File path: antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
##########
@@ -641,6 +640,7 @@ dateFormat
 constant
     : dateExpression
     | NaN
+    | SDT

Review comment:
       if SDT is a constant or propertyValue, I don't think it needs a keyword.




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [27 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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



##########
File path: antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
##########
@@ -641,6 +640,7 @@ dateFormat
 constant
     : dateExpression
     | NaN
+    | SDT

Review comment:
       Maybe you need to add some parameter name of sdt?
   And Please add some example in the docs.

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java
##########
@@ -97,18 +109,93 @@ public ChunkWriterImpl(MeasurementSchema schema) {
     this.pageWriter = new PageWriter(measurementSchema);
     this.pageWriter.setTimeEncoder(measurementSchema.getTimeEncoder());
     this.pageWriter.setValueEncoder(measurementSchema.getValueEncoder());
+
+    //check if the measurement schema uses SDT
+    checkSdtEncoding();
+  }
+
+  public ChunkWriterImpl(MeasurementSchema schema, boolean isMerging) {
+    this(schema);
+    this.isMerging = isMerging;
+  }
+
+  private void checkSdtEncoding() {
+    if (measurementSchema.getProps() != null && !isMerging) {
+      for (Map.Entry<String, String> entry : measurementSchema.getProps().entrySet()) {
+        //check if is sdt encoding
+        if (entry.getKey().toLowerCase().equals("loss") && entry.getValue().toLowerCase()
+            .equals("sdt")) {
+          isSdtEncoding = true;
+          sdtEncoder = new SdtEncoder();
+        }
+
+        //set compression deviation
+        else if (isSdtEncoding &&
+            entry.getKey().toLowerCase().equals("cd")) {

Review comment:
       cd is too simple

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java
##########
@@ -155,6 +266,12 @@ public void write(long[] timestamps, boolean[] values, int batchSize) {
 
   @Override
   public void write(long[] timestamps, float[] values, int batchSize) {

Review comment:
       so, how about double[] ?




----------------------------------------------------------------
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] Genius-pig commented on a change in pull request #2087: [IOTDB-890] SDT implementation

Posted by GitBox <gi...@apache.org>.
Genius-pig commented on a change in pull request #2087:
URL: https://github.com/apache/iotdb/pull/2087#discussion_r528588358



##########
File path: antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
##########
@@ -1272,6 +1268,8 @@ UNDERLINE : '_';
 
 NaN : 'NaN';
 
+SDT : 'SDT';

Review comment:
       Why write like this. didn't SDT need case insensitive? if SDT is a constant or propertyValue, I don't think it needs a keyword.




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [28 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] qiaojialin commented on a change in pull request #2087: [IOTDB-890] SDT implementation

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



##########
File path: example/session/src/main/java/org/apache/iotdb/SessionExample.java
##########
@@ -48,28 +48,41 @@
 
   public static void main(String[] args)
       throws IoTDBConnectionException, StatementExecutionException {
-    session = new Session("127.0.0.1", 6667, "root", "root");
+    session = new Session("172.16.48.4", 58890, "root", "root");
     session.open(false);
 
+   // session.executeNonQueryStatement("delete storage group root");
+    /*
     try {
       session.setStorageGroup("root.sg1");
     } catch (StatementExecutionException e) {
       if (e.getStatusCode() != TSStatusCode.PATH_ALREADY_EXIST_ERROR.getStatusCode())
         throw e;
     }
 
-    createTimeseries();

Review comment:
       could the SDT be set using Session nosql API?

##########
File path: example/session/src/main/java/org/apache/iotdb/SessionExample.java
##########
@@ -48,28 +48,41 @@
 
   public static void main(String[] args)
       throws IoTDBConnectionException, StatementExecutionException {
-    session = new Session("127.0.0.1", 6667, "root", "root");
+    session = new Session("172.16.48.4", 58890, "root", "root");

Review comment:
       Hi, please recover this class.

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java
##########
@@ -119,14 +194,26 @@ public void write(long time, boolean value) {
 
   @Override
   public void write(long time, float value) {
-    pageWriter.write(time, value);
-    checkPageSizeAndMayOpenANewPage();
+    if (!isSdtEncoding || sdtEncoder.encodeFloat(time, value)) {
+      if (isSdtEncoding) {
+        time = sdtEncoder.getTime();
+        value = (float) sdtEncoder.getValue();
+      }
+      pageWriter.write(time, value);
+      checkPageSizeAndMayOpenANewPage();
+    }
   }
 
   @Override
   public void write(long time, double value) {
-    pageWriter.write(time, value);
-    checkPageSizeAndMayOpenANewPage();
+    if (!isSdtEncoding || sdtEncoder.encodeDouble(time, value)) {
+      if (isSdtEncoding) {
+        time = sdtEncoder.getTime();
+        value = (double) sdtEncoder.getValue();

Review comment:
       could we getDoubleValue()?

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SdtEncoder.java
##########
@@ -0,0 +1,583 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.tsfile.encoding.encoder;
+
+import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+
+public class SdtEncoder {

Review comment:
       ```suggestion
   public class SDTEncoder {
   ```




----------------------------------------------------------------
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] qiaojialin commented on a change in pull request #2087: [IOTDB-890] SDT implementation

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



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SDTEncoder.java
##########
@@ -0,0 +1,540 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.tsfile.encoding.encoder;
+
+public class SDTEncoder {
+
+  /**
+   * the last read time and value
+   * if upperDoor >= lowerDoor meaning out of compDeviation range, will store lastReadPair
+   */
+  private long lastReadTimestamp;
+  private long lastReadLong;
+  private double lastReadDouble;
+  private int lastReadInt;
+  private float lastReadFloat;
+
+  /**
+   * the last stored time and vlaue
+   * we compare current point against lastStoredPair
+   */
+  private long lastStoredTimestamp;
+  private long lastStoredLong;
+  private double lastStoredDouble;
+  private int lastStoredInt;
+  private float lastStoredFloat;
+
+  /**
+   * the maximum curUpperSlope between the lastStoredPoint to the current point
+   * upperDoor can only open up
+   */
+  private double upperDoor;
+
+  /**
+   * the minimum curLowerSlope between the lastStoredPoint to the current point
+   * lowerDoor can only open downard
+   */
+  private double lowerDoor;
+
+  /**
+   * the maximum absolute difference the user set
+   * if the data's value is within compDeviation, it will be compressed and discarded
+   * after compression, it will only store out of range <time, data></> to form the trend
+   */
+  private double compDeviation;
+
+  /**
+   * the minimum time distance between two stored data points
+   * if current point time to the last stored point time distance <= compMin,
+   * current point will NOT be stored regardless of compression deviation
+   */
+  private double compMin;
+
+  /**
+   * the maximum time distance between two stored data points
+   * if current point time to the last stored point time distance >= compMax,
+   * current point will be stored regardless of compression deviation
+   */
+  private double compMax;
+
+  /**
+   * isFirstValue is true when the encoder takes the first point or reset() when cur point's
+   * distance to the last stored point's distance exceeds compMax
+   */
+  private boolean isFirstValue;
+
+  public SDTEncoder() {
+    upperDoor = Integer.MIN_VALUE;
+    lowerDoor = Integer.MAX_VALUE;
+    compDeviation = -1;
+    compMin = Integer.MIN_VALUE;
+    compMax = Integer.MAX_VALUE;
+    isFirstValue = true;
+  }
+
+  public boolean encodeFloat(long time, float value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredFloat - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadFloat) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredFloat + compDeviation - lastReadFloat + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredFloat = (float) (lastStoredFloat + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredFloat - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredFloat + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadFloat = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredFloat + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadFloat) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredFloat - compDeviation - lastReadFloat + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredFloat = (float) (lastStoredFloat - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredFloat - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredFloat + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadFloat = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    lastReadFloat = value;
+    lastReadTimestamp = time;
+    return false;
+  }
+
+  public boolean encodeLong(long time, long value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredLong - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadLong) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredLong + compDeviation - lastReadLong + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredLong = Math.round((lastStoredLong + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredLong - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredLong + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadLong = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredLong + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadLong) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredLong - compDeviation - lastReadLong + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredLong = Math.round((lastStoredLong - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredLong - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredLong + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadLong = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+    lastReadLong = value;
+    lastReadTimestamp = time;
+
+    return false;
+  }
+
+  public boolean encodeInt(long time, int value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredInt - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadInt) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredInt + compDeviation - lastReadInt + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredInt = (int) Math.round((lastStoredInt + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredInt - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredInt + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadInt = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredInt + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadInt) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredInt - compDeviation - lastReadInt + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredInt = (int) Math.round((lastStoredInt - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredInt - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredInt + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadInt = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    lastReadInt = value;
+    lastReadTimestamp = time;
+    return false;
+  }
+
+  public boolean encodeDouble(long time, double value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredDouble - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadDouble) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredDouble + compDeviation - lastReadDouble + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredDouble = (lastStoredDouble + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredDouble - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredDouble + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadDouble = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredDouble + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadDouble) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredDouble - compDeviation - lastReadDouble + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredDouble = (lastStoredDouble - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredDouble - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredDouble + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadDouble = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    lastReadDouble = value;
+    lastReadTimestamp = time;
+    return false;
+  }
+
+  public int encode(long[] timestamps, double[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeDouble(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredDouble;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  public int encode(long[] timestamps, int[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeInt(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredInt;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  public int encode(long[] timestamps, long[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeLong(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredLong;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  public int encode(long[] timestamps, float[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeFloat(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredFloat;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  private boolean isFirstValue(long time, float value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadFloat = value;
+      lastStoredTimestamp = time;
+      lastStoredFloat = value;
+      return true;
+    }
+    return false;
+  }
+
+  private boolean isFirstValue(long time, long value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadLong = value;
+      lastStoredTimestamp = time;
+      lastStoredLong = value;
+      return true;
+    }
+    return false;
+  }
+
+  private boolean isFirstValue(long time, int value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadInt = value;
+      lastStoredTimestamp = time;
+      lastStoredInt = value;
+      return true;
+    }
+    return false;
+  }
+
+  private boolean isFirstValue(long time, double value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadDouble = value;
+      lastStoredTimestamp = time;
+      lastStoredDouble = value;
+      return true;
+    }
+    return false;
+  }
+
+  private void reset() {
+    upperDoor = Integer.MIN_VALUE;
+    lowerDoor = Integer.MAX_VALUE;
+    isFirstValue = true;

Review comment:
       false? Otherwise, the lastStoredTimestamp you stored will be replaced by next point




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [25 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] Genius-pig commented on a change in pull request #2087: [IOTDB-890] SDT implementation

Posted by GitBox <gi...@apache.org>.
Genius-pig commented on a change in pull request #2087:
URL: https://github.com/apache/iotdb/pull/2087#discussion_r528588358



##########
File path: antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
##########
@@ -1272,6 +1268,8 @@ UNDERLINE : '_';
 
 NaN : 'NaN';
 
+SDT : 'SDT';

Review comment:
       Why write like this. Does SDT didn't need case insensitive?

##########
File path: antlr/src/main/antlr4/org/apache/iotdb/db/qp/strategy/SqlBase.g4
##########
@@ -641,6 +640,7 @@ dateFormat
 constant
     : dateExpression
     | NaN
+    | SDT

Review comment:
       if SDT is a constant, I don't think it needs a keyword.




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [28 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/is
 sues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [63 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.3%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.3% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] JackieTien97 commented on a change in pull request #2087: [IOTDB-890] SDT implementation

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



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java
##########
@@ -97,18 +109,93 @@ public ChunkWriterImpl(MeasurementSchema schema) {
     this.pageWriter = new PageWriter(measurementSchema);
     this.pageWriter.setTimeEncoder(measurementSchema.getTimeEncoder());
     this.pageWriter.setValueEncoder(measurementSchema.getValueEncoder());
+
+    //check if the measurement schema uses SDT
+    checkSdtEncoding();
+  }
+
+  public ChunkWriterImpl(MeasurementSchema schema, boolean isMerging) {
+    this(schema);
+    this.isMerging = isMerging;
+  }
+
+  private void checkSdtEncoding() {
+    if (measurementSchema.getProps() != null && !isMerging) {
+      for (Map.Entry<String, String> entry : measurementSchema.getProps().entrySet()) {

Review comment:
       No need to iterate the map, and also there is no guarantee that "loss" property will be got before other sdt parameters.
   
   You can directly use map.contains and map.get() to get whatever property you want.




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SdtEncoder.java
##########
@@ -0,0 +1,473 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.tsfile.encoding.encoder;
+
+import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.utils.Pair;
+
+public class SdtEncoder {
+
+  /**
+   * the last read pair <time, value></>
+   * if upperDoor >= lowerDoor meaning out of compDeviation range, will store lastReadPair
+   */
+  private Pair<Long, Double> lastReadDouble;

Review comment:
       use primitive data type, this is also has box cost.

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SdtEncoder.java
##########
@@ -0,0 +1,473 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.tsfile.encoding.encoder;
+
+import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.utils.Pair;
+
+public class SdtEncoder {
+
+  /**
+   * the last read pair <time, value></>
+   * if upperDoor >= lowerDoor meaning out of compDeviation range, will store lastReadPair
+   */
+  private Pair<Long, Double> lastReadDouble;
+  private Pair<Long, Long> lastReadLong;
+  private Pair<Long, Float> lastReadFloat;
+  private Pair<Long, Integer> lastReadInt;
+
+  /**
+   * the last stored pair <time, value></>
+   * we compare current point against lastStoredPair
+   */
+  private Pair<Long, Double> lastStoredDouble;
+  private Pair<Long, Long> lastStoredLong;
+  private Pair<Long, Float> lastStoredFloat;
+  private Pair<Long, Integer> lastStoredInt;
+  /**
+   * the maximum curUpperSlope between the lastStoredPoint to the current point
+   * upperDoor can only open up
+   */
+  private double upperDoor;
+
+  /**
+   * the minimum curLowerSlope between the lastStoredPoint to the current point
+   * lowerDoor can only open downard
+   */
+  private double lowerDoor;
+
+  private List<Long> timestamps;
+  private List<Double> doubleValues;
+  private List<Long> longValues;
+  private List<Integer> intValues;
+  private List<Float> floatValues;
+
+
+
+  /**
+   * the maximum absolute difference the user set
+   * if the data's value is within compDeviation, it will be compressed and discarded
+   * after compression, it will only store out of range <time, data></> to form the trend
+   */
+  private double compDeviation;
+
+  /**
+   * the minimum time distance between two stored data points
+   * if current point time to the last stored point time distance <= compMin,
+   * current point will NOT be stored regardless of compression deviation
+   */
+  private double compMin;
+
+  /**
+   * the maximum time distance between two stored data points
+   * if current point time to the last stored point time distance >= compMax,
+   * current point will be stored regardless of compression deviation
+   */
+  private double compMax;
+
+  TSDataType dataType;
+
+  public SdtEncoder(TSDataType dataType) {
+    timestamps = new ArrayList<Long>();
+    upperDoor = Integer.MIN_VALUE;
+    lowerDoor = Integer.MAX_VALUE;
+    compDeviation = -1;
+    compMin = Integer.MIN_VALUE;
+    compMax = Integer.MAX_VALUE;
+    this.dataType = dataType;
+
+    switch (dataType) {
+      case INT32:
+        lastReadInt = new Pair<>(null, null);
+        lastStoredInt = new Pair<>(null, null);
+        intValues = new ArrayList<>();
+        break;
+      case INT64:
+        lastReadLong = new Pair<>(null, null);
+        lastStoredLong = new Pair<>(null, null);
+        longValues = new ArrayList<>();
+        break;
+      case DOUBLE:
+        lastReadDouble = new Pair<>(null, null);
+        lastStoredDouble = new Pair<>(null, null);
+        doubleValues = new ArrayList<>();
+        break;
+      case FLOAT:
+        lastReadFloat = new Pair<>(null, null);
+        lastStoredFloat = new Pair<>(null, null);
+        floatValues = new ArrayList<>();
+        break;
+    }
+  }
+
+  public boolean encodeFloat(long time, float value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredFloat.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredFloat.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredFloat.right - compDeviation) / (time - lastStoredFloat.left);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+    }
+
+    double curLowerSlope = (value - lastStoredFloat.right + compDeviation) / (time - lastStoredFloat.left);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+    }
+
+    // current point to the lastStoredPair's value exceeds compDev, will store lastReadPair and update two doors
+    if (upperDoor >= lowerDoor) {
+      lastStoredFloat = lastReadFloat;
+      upperDoor = (value - lastStoredFloat.right - compDeviation) / (time - lastStoredFloat.left);
+      lowerDoor = (value - lastStoredFloat.right + compDeviation) / (time - lastStoredFloat.left);
+      lastReadFloat = new Pair<>(time, value);
+      return true;
+    }
+
+    lastReadFloat = new Pair<>(time, value);
+    return false;
+  }
+
+  public boolean encodeLong(long time, long value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredLong.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredLong.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredLong.right - compDeviation) / (time - lastStoredLong.left);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+    }
+
+    double curLowerSlope = (value - lastStoredLong.right + compDeviation) / (time - lastStoredLong.left);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+    }
+
+    // current point to the lastStoredPair's value exceeds compDev, will store lastReadPair and update two doors
+    if (upperDoor >= lowerDoor) {
+      lastStoredLong = lastReadLong;
+      upperDoor = (value - lastStoredLong.right - compDeviation) / (time - lastStoredLong.left);
+      lowerDoor = (value - lastStoredLong.right + compDeviation) / (time - lastStoredLong.left);
+      lastReadLong = new Pair<>(time, value);
+      return true;
+    }
+
+    lastReadLong = new Pair<>(time, value);
+    return false;
+  }
+
+  public boolean encodeInt(long time, int value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredInt.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredInt.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredInt.right - compDeviation) / (time - lastStoredInt.left);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+    }
+
+    double curLowerSlope = (value - lastStoredInt.right + compDeviation) / (time - lastStoredInt.left);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+    }
+
+    // current point to the lastStoredPair's value exceeds compDev, will store lastReadPair and update two doors
+    if (upperDoor >= lowerDoor) {
+      lastStoredInt = lastReadInt;
+      upperDoor = (value - lastStoredInt.right - compDeviation) / (time - lastStoredInt.left);
+      lowerDoor = (value - lastStoredInt.right + compDeviation) / (time - lastStoredInt.left);
+      lastReadInt = new Pair<>(time, value);
+      return true;
+    }
+
+    lastReadInt = new Pair<>(time, value);
+    return false;
+  }
+  public boolean encodeDouble(long time, double value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredDouble.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredDouble.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredDouble.right - compDeviation) / (time - lastStoredDouble.left);

Review comment:
       maybe have divide zero exception

##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SdtEncoder.java
##########
@@ -0,0 +1,473 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.tsfile.encoding.encoder;
+
+import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.utils.Pair;
+
+public class SdtEncoder {
+
+  /**
+   * the last read pair <time, value></>
+   * if upperDoor >= lowerDoor meaning out of compDeviation range, will store lastReadPair
+   */
+  private Pair<Long, Double> lastReadDouble;
+  private Pair<Long, Long> lastReadLong;
+  private Pair<Long, Float> lastReadFloat;
+  private Pair<Long, Integer> lastReadInt;
+
+  /**
+   * the last stored pair <time, value></>
+   * we compare current point against lastStoredPair
+   */
+  private Pair<Long, Double> lastStoredDouble;
+  private Pair<Long, Long> lastStoredLong;
+  private Pair<Long, Float> lastStoredFloat;
+  private Pair<Long, Integer> lastStoredInt;
+  /**
+   * the maximum curUpperSlope between the lastStoredPoint to the current point
+   * upperDoor can only open up
+   */
+  private double upperDoor;
+
+  /**
+   * the minimum curLowerSlope between the lastStoredPoint to the current point
+   * lowerDoor can only open downard
+   */
+  private double lowerDoor;
+
+  private List<Long> timestamps;
+  private List<Double> doubleValues;
+  private List<Long> longValues;
+  private List<Integer> intValues;
+  private List<Float> floatValues;
+
+
+
+  /**
+   * the maximum absolute difference the user set
+   * if the data's value is within compDeviation, it will be compressed and discarded
+   * after compression, it will only store out of range <time, data></> to form the trend
+   */
+  private double compDeviation;
+
+  /**
+   * the minimum time distance between two stored data points
+   * if current point time to the last stored point time distance <= compMin,
+   * current point will NOT be stored regardless of compression deviation
+   */
+  private double compMin;
+
+  /**
+   * the maximum time distance between two stored data points
+   * if current point time to the last stored point time distance >= compMax,
+   * current point will be stored regardless of compression deviation
+   */
+  private double compMax;
+
+  TSDataType dataType;
+
+  public SdtEncoder(TSDataType dataType) {
+    timestamps = new ArrayList<Long>();
+    upperDoor = Integer.MIN_VALUE;
+    lowerDoor = Integer.MAX_VALUE;
+    compDeviation = -1;
+    compMin = Integer.MIN_VALUE;
+    compMax = Integer.MAX_VALUE;
+    this.dataType = dataType;
+
+    switch (dataType) {
+      case INT32:
+        lastReadInt = new Pair<>(null, null);
+        lastStoredInt = new Pair<>(null, null);
+        intValues = new ArrayList<>();
+        break;
+      case INT64:
+        lastReadLong = new Pair<>(null, null);
+        lastStoredLong = new Pair<>(null, null);
+        longValues = new ArrayList<>();
+        break;
+      case DOUBLE:
+        lastReadDouble = new Pair<>(null, null);
+        lastStoredDouble = new Pair<>(null, null);
+        doubleValues = new ArrayList<>();
+        break;
+      case FLOAT:
+        lastReadFloat = new Pair<>(null, null);
+        lastStoredFloat = new Pair<>(null, null);
+        floatValues = new ArrayList<>();
+        break;
+    }
+  }
+
+  public boolean encodeFloat(long time, float value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredFloat.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredFloat.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredFloat.right - compDeviation) / (time - lastStoredFloat.left);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+    }
+
+    double curLowerSlope = (value - lastStoredFloat.right + compDeviation) / (time - lastStoredFloat.left);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+    }
+
+    // current point to the lastStoredPair's value exceeds compDev, will store lastReadPair and update two doors
+    if (upperDoor >= lowerDoor) {
+      lastStoredFloat = lastReadFloat;
+      upperDoor = (value - lastStoredFloat.right - compDeviation) / (time - lastStoredFloat.left);
+      lowerDoor = (value - lastStoredFloat.right + compDeviation) / (time - lastStoredFloat.left);
+      lastReadFloat = new Pair<>(time, value);
+      return true;
+    }
+
+    lastReadFloat = new Pair<>(time, value);
+    return false;
+  }
+
+  public boolean encodeLong(long time, long value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredLong.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredLong.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredLong.right - compDeviation) / (time - lastStoredLong.left);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+    }
+
+    double curLowerSlope = (value - lastStoredLong.right + compDeviation) / (time - lastStoredLong.left);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+    }
+
+    // current point to the lastStoredPair's value exceeds compDev, will store lastReadPair and update two doors
+    if (upperDoor >= lowerDoor) {
+      lastStoredLong = lastReadLong;
+      upperDoor = (value - lastStoredLong.right - compDeviation) / (time - lastStoredLong.left);
+      lowerDoor = (value - lastStoredLong.right + compDeviation) / (time - lastStoredLong.left);
+      lastReadLong = new Pair<>(time, value);
+      return true;
+    }
+
+    lastReadLong = new Pair<>(time, value);
+    return false;
+  }
+
+  public boolean encodeInt(long time, int value) {
+    // store the first time and value pair
+    if (firstPair(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredInt.left <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredInt.left >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredInt.right - compDeviation) / (time - lastStoredInt.left);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+    }
+
+    double curLowerSlope = (value - lastStoredInt.right + compDeviation) / (time - lastStoredInt.left);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+    }
+
+    // current point to the lastStoredPair's value exceeds compDev, will store lastReadPair and update two doors
+    if (upperDoor >= lowerDoor) {
+      lastStoredInt = lastReadInt;
+      upperDoor = (value - lastStoredInt.right - compDeviation) / (time - lastStoredInt.left);
+      lowerDoor = (value - lastStoredInt.right + compDeviation) / (time - lastStoredInt.left);
+      lastReadInt = new Pair<>(time, value);
+      return true;
+    }
+
+    lastReadInt = new Pair<>(time, value);
+    return false;
+  }

Review comment:
       need a blank line




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [27 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [27 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] qiaojialin merged pull request #2087: [IOTDB-890] SDT implementation

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


   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] HTHou commented on pull request #2087: [IOTDB-890] SDT implementation

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


   The link of the design doc is here. :) https://cwiki.apache.org/confluence/display/IOTDB/SDT+encoding


----------------------------------------------------------------
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] qiaojialin commented on pull request #2087: [IOTDB-890] SDT implementation

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


   Besides, there are many code smells, try to fix them ~


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [27 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] haimeiguo commented on a change in pull request #2087: [IOTDB-890] SDT implementation

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



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java
##########
@@ -97,18 +109,93 @@ public ChunkWriterImpl(MeasurementSchema schema) {
     this.pageWriter = new PageWriter(measurementSchema);
     this.pageWriter.setTimeEncoder(measurementSchema.getTimeEncoder());
     this.pageWriter.setValueEncoder(measurementSchema.getValueEncoder());
+
+    //check if the measurement schema uses SDT
+    checkSdtEncoding();
+  }
+
+  public ChunkWriterImpl(MeasurementSchema schema, boolean isMerging) {
+    this(schema);
+    this.isMerging = isMerging;
+  }
+
+  private void checkSdtEncoding() {
+    if (measurementSchema.getProps() != null && !isMerging) {
+      for (Map.Entry<String, String> entry : measurementSchema.getProps().entrySet()) {

Review comment:
       will do. thank you. 
   For "The paper calculate the FV of the next segment but you just use the endPoint of the last segment.", what do you mean by that? When ending segment0 and starting segment1, I use segment0's endpoint as segment1's startpoint. How do you calculate segment1's first value..?




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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] qiaojialin commented on a change in pull request #2087: [IOTDB-890] SDT implementation

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



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SDTEncoder.java
##########
@@ -0,0 +1,540 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.tsfile.encoding.encoder;
+
+public class SDTEncoder {
+
+  /**
+   * the last read time and value
+   * if upperDoor >= lowerDoor meaning out of compDeviation range, will store lastReadPair
+   */
+  private long lastReadTimestamp;
+  private long lastReadLong;
+  private double lastReadDouble;
+  private int lastReadInt;
+  private float lastReadFloat;
+
+  /**
+   * the last stored time and vlaue
+   * we compare current point against lastStoredPair
+   */
+  private long lastStoredTimestamp;
+  private long lastStoredLong;
+  private double lastStoredDouble;
+  private int lastStoredInt;
+  private float lastStoredFloat;
+
+  /**
+   * the maximum curUpperSlope between the lastStoredPoint to the current point
+   * upperDoor can only open up
+   */
+  private double upperDoor;
+
+  /**
+   * the minimum curLowerSlope between the lastStoredPoint to the current point
+   * lowerDoor can only open downard
+   */
+  private double lowerDoor;
+
+  /**
+   * the maximum absolute difference the user set
+   * if the data's value is within compDeviation, it will be compressed and discarded
+   * after compression, it will only store out of range <time, data></> to form the trend
+   */
+  private double compDeviation;
+
+  /**
+   * the minimum time distance between two stored data points
+   * if current point time to the last stored point time distance <= compMin,
+   * current point will NOT be stored regardless of compression deviation
+   */
+  private double compMin;
+
+  /**
+   * the maximum time distance between two stored data points
+   * if current point time to the last stored point time distance >= compMax,
+   * current point will be stored regardless of compression deviation
+   */
+  private double compMax;
+
+  /**
+   * isFirstValue is true when the encoder takes the first point or reset() when cur point's
+   * distance to the last stored point's distance exceeds compMax
+   */
+  private boolean isFirstValue;
+
+  public SDTEncoder() {
+    upperDoor = Integer.MIN_VALUE;
+    lowerDoor = Integer.MAX_VALUE;
+    compDeviation = -1;
+    compMin = Integer.MIN_VALUE;
+    compMax = Integer.MAX_VALUE;
+    isFirstValue = true;
+  }
+
+  public boolean encodeFloat(long time, float value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredFloat - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadFloat) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredFloat + compDeviation - lastReadFloat + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredFloat = (float) (lastStoredFloat + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredFloat - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredFloat + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadFloat = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredFloat + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadFloat) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredFloat - compDeviation - lastReadFloat + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredFloat = (float) (lastStoredFloat - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredFloat - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredFloat + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadFloat = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    lastReadFloat = value;
+    lastReadTimestamp = time;
+    return false;
+  }
+
+  public boolean encodeLong(long time, long value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredLong - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadLong) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredLong + compDeviation - lastReadLong + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredLong = Math.round((lastStoredLong + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredLong - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredLong + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadLong = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredLong + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadLong) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredLong - compDeviation - lastReadLong + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredLong = Math.round((lastStoredLong - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredLong - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredLong + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadLong = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+    lastReadLong = value;
+    lastReadTimestamp = time;
+
+    return false;
+  }
+
+  public boolean encodeInt(long time, int value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredInt - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadInt) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredInt + compDeviation - lastReadInt + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredInt = (int) Math.round((lastStoredInt + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredInt - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredInt + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadInt = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredInt + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = ((double) value - lastReadInt) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredInt - compDeviation - lastReadInt + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredInt = (int) Math.round((lastStoredInt - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2));
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredInt - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredInt + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadInt = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    lastReadInt = value;
+    lastReadTimestamp = time;
+    return false;
+  }
+
+  public boolean encodeDouble(long time, double value) {
+    // store the first time and value pair
+    if (isFirstValue(time, value)) {
+      return true;
+    }
+
+    // if current point to the last stored point's time distance is within compMin,
+    // will not check two doors nor store any point within the compMin time range
+    if (time - lastStoredTimestamp <= compMin) {
+      return false;
+    }
+
+    // if current point to the last stored point's time distance is larger than compMax,
+    // will reset two doors, and store current point;
+    if (time - lastStoredTimestamp >= compMax) {
+      reset(time, value);
+      return true;
+    }
+
+    double curUpperSlope = (value - lastStoredDouble - compDeviation) / (time - lastStoredTimestamp);
+    if (curUpperSlope > upperDoor) {
+      upperDoor = curUpperSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadDouble) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredDouble + compDeviation - lastReadDouble + slope * lastReadTimestamp -
+            lowerDoor * lastStoredTimestamp) / (slope - lowerDoor));
+        lastStoredDouble = (lastStoredDouble + compDeviation + lowerDoor * (timestamp - lastStoredTimestamp)
+            - compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredDouble - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredDouble + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadDouble = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    double curLowerSlope = (value - lastStoredDouble + compDeviation) / (time - lastStoredTimestamp);
+    if (curLowerSlope < lowerDoor) {
+      lowerDoor = curLowerSlope;
+      if (upperDoor > lowerDoor) {
+        // slope between curr point and last read point
+        double slope = (value - lastReadDouble) / (time - lastReadTimestamp);
+        // start point of the next segment
+        long timestamp = (long) ((lastStoredDouble - compDeviation - lastReadDouble + slope * lastReadTimestamp -
+            upperDoor * lastStoredTimestamp) / (slope - upperDoor));
+        lastStoredDouble = (lastStoredDouble - compDeviation + upperDoor * (timestamp - lastStoredTimestamp)
+            + compDeviation / 2);
+        lastStoredTimestamp = timestamp;
+        // recalculate upperDoor and lowerDoor
+        upperDoor = (value - lastStoredDouble - compDeviation) / (time - lastStoredTimestamp);
+        lowerDoor = (value - lastStoredDouble + compDeviation) / (time - lastStoredTimestamp);
+        // update last read point to current point
+        lastReadDouble = value;
+        lastReadTimestamp = time;
+        return true;
+      }
+    }
+
+    lastReadDouble = value;
+    lastReadTimestamp = time;
+    return false;
+  }
+
+  public int encode(long[] timestamps, double[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeDouble(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredDouble;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  public int encode(long[] timestamps, int[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeInt(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredInt;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  public int encode(long[] timestamps, long[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeLong(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredLong;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  public int encode(long[] timestamps, float[] values, int batchSize) {
+    int index = 0;
+    for (int i = 0; i < batchSize; i++) {
+      if (encodeFloat(timestamps[i], values[i])) {
+        timestamps[index] = lastStoredTimestamp;
+        values[index] = lastStoredFloat;
+        index++;
+      }
+    }
+    return index;
+  }
+
+  private boolean isFirstValue(long time, float value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadFloat = value;
+      lastStoredTimestamp = time;
+      lastStoredFloat = value;
+      return true;
+    }
+    return false;
+  }
+
+  private boolean isFirstValue(long time, long value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadLong = value;
+      lastStoredTimestamp = time;
+      lastStoredLong = value;
+      return true;
+    }
+    return false;
+  }
+
+  private boolean isFirstValue(long time, int value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadInt = value;
+      lastStoredTimestamp = time;
+      lastStoredInt = value;
+      return true;
+    }
+    return false;
+  }
+
+  private boolean isFirstValue(long time, double value) {
+    if (isFirstValue) {
+      isFirstValue = false;
+      lastReadTimestamp = time;
+      lastReadDouble = value;
+      lastStoredTimestamp = time;
+      lastStoredDouble = value;
+      return true;
+    }
+    return false;
+  }
+
+  private void reset() {
+    upperDoor = Integer.MIN_VALUE;
+    lowerDoor = Integer.MAX_VALUE;
+    isFirstValue = true;

Review comment:
       false?




----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [28 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/is
 sues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [63 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.3%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.3% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [25 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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 #2087: [IOTDB-890] SDT implementation

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


   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=2087&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=2087&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087&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=2087&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=VULNERABILITY) (and [<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/issues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i
 ssues?id=apache_incubator-iotdb&pullRequest=2087&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<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=2087&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=2087&resolved=false&types=CODE_SMELL) [26 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2087&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=2087) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2087&metric=new_duplicated_lines_density&view=list)
   
   


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