You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Bo Zhang (Jira)" <ji...@apache.org> on 2021/09/22 07:25:00 UTC
[jira] [Assigned] (IOTDB-1287) C++ class Session has 2 useless
sort()
[ https://issues.apache.org/jira/browse/IOTDB-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bo Zhang reassigned IOTDB-1287:
-------------------------------
Assignee: Bo Zhang
> C++ class Session has 2 useless sort()
> --------------------------------------
>
> Key: IOTDB-1287
> URL: https://issues.apache.org/jira/browse/IOTDB-1287
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Client/Others
> Reporter: Bo Zhang
> Assignee: Bo Zhang
> Priority: Major
> Labels: easy-fix, pull-request-available
> Fix For: master branch, 0.12.3
>
>
> 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); sort(tablet.timestamps, tablet.timestamps + tablet.rowSize); ... }
> void Session::insertRecordsOfOneDevice(string deviceId, ...)
> { ... this->sortIndexByTimestamp(index, times.data(), times.size()); sort(times.begin(), times.end()); ... }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)