You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/15 03:01:11 UTC

[GitHub] [iotdb] jamber001 opened a new pull request #3966: [IOTDB-1287] C++ class Session has 2 useless sort()

jamber001 opened a new pull request #3966:
URL: https://github.com/apache/iotdb/pull/3966


   ## Description
   [IOTDB-1287] C++ class Session has 2 useless sort()
   In below codes, those 2 sort() should be useless, because "tablet.timestamps" or "times" has been sorted in sortIndexByTimestamp()
   
   ============================================
   
   File: ./client-cpp/src/main/Session.cpp
   
   void Session::sortTablet(Tablet& tablet) {
      ... 
      this->sortIndexByTimestamp(index, tablet.timestamps, tablet.rowSize);    //here, has sorted timestamps
      sort(tablet.timestamps, tablet.timestamps + tablet.rowSize);  //useless sort
       ... 
   }
   
   void Session::insertRecordsOfOneDevice(string deviceId, ...){
       ... 
       this->sortIndexByTimestamp(index, times.data(), times.size());    //here, has sorted times
       sort(times.begin(), times.end());    //useless sort
        ... 
   }
   


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

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

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



[GitHub] [iotdb] HTHou merged pull request #3966: [IOTDB-1287] C++ class Session has 2 useless sort()

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


   


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

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

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