Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-1287

C++ class Session has 2 useless sort()

    XMLWordPrintableJSON

Details

    Description

      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()); ... }

      Attachments

        Activity

          People

            jamber001 Bo Zhang
            jamber001 Bo Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: