761417898 commented on code in PR #16094:
URL: https://github.com/apache/iotdb/pull/16094#discussion_r2252900359


##########
iotdb-client/client-cpp/src/main/Session.h:
##########
@@ -322,6 +322,59 @@ class Tablet {
         }
     }
 
+    // Add a Binary value with extra metadata: [isEOF (1 byte)] + [offset (8 
bytes)] + [actual content]
+    void addValue(size_t schemaId, size_t rowIndex, bool isEOF, int64_t 
offset, const std::vector<uint8_t>& content) {
+        // Check schemaId bounds
+        if (schemaId >= schemas.size()) {
+            char tmpStr[100];
+            sprintf(tmpStr,
+                    "Tablet::addBinaryValueWithMeta(), schemaId >= 
schemas.size(). schemaId=%ld, schemas.size()=%ld.",
+                    schemaId, schemas.size());
+            throw std::out_of_range(tmpStr);
+        }
+
+        // Check rowIndex bounds
+        if (rowIndex >= rowSize) {
+            char tmpStr[100];
+            sprintf(tmpStr, "Tablet::addBinaryValueWithMeta(), rowIndex >= 
rowSize. rowIndex=%ld, rowSize=%ld.",
+                    rowIndex, rowSize);
+            throw std::out_of_range(tmpStr);
+        }
+
+        // Validate data type: must be TEXT, STRING, or BLOB

Review Comment:
   removed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to