This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new f465aac433 IOTDB-3901 C++ client method of insertRecordsOfOneDevice
sorting optimization (#6734)
f465aac433 is described below
commit f465aac433676b1a9272617482a6114e8d1abae5
Author: liruizhi19 <[email protected]>
AuthorDate: Thu Jul 21 08:58:51 2022 +0800
IOTDB-3901 C++ client method of insertRecordsOfOneDevice sorting
optimization (#6734)
---
client-cpp/src/main/Session.cpp | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/client-cpp/src/main/Session.cpp b/client-cpp/src/main/Session.cpp
index 99205f337f..64c0ea0741 100644
--- a/client-cpp/src/main/Session.cpp
+++ b/client-cpp/src/main/Session.cpp
@@ -906,11 +906,7 @@ void Session::insertRecordsOfOneDevice(const string
&deviceId,
vector<vector<char *>> &valuesList,
bool sorted) {
- if (sorted) {
- if (!checkSorted(times)) {
- throw BatchExecutionException("Times in InsertOneDeviceRecords are
not in ascending order");
- }
- } else {
+ if (!checkSorted(times)) {
int *index = new int[times.size()];
for (size_t i = 0; i < times.size(); i++) {
index[i] = i;
@@ -962,11 +958,7 @@ void Session::insertAlignedRecordsOfOneDevice(const string
&deviceId,
vector<vector<char *>>
&valuesList,
bool sorted) {
- if (sorted) {
- if (!checkSorted(times)) {
- throw BatchExecutionException("Times in InsertOneDeviceRecords are
not in ascending order");
- }
- } else {
+ if (!checkSorted(times)) {
int *index = new int[times.size()];
for (size_t i = 0; i < times.size(); i++) {
index[i] = i;