ademakov commented on code in PR #1289:
URL: https://github.com/apache/ignite-3/pull/1289#discussion_r1012620679


##########
modules/platforms/cpp/ignite/schema/binary_tuple_builder.h:
##########
@@ -212,88 +268,282 @@ class binary_tuple_builder {
     /**
      * @brief Appends a value for the next element.
      *
+     * @param type Element type.
+     * @param value Value of an internal tuple field.
+     */
+    void append(ignite_type type, const bytes_view &bytes);
+
+    /**
+     * @brief Appends a value or null for the next element.
+     *
+     * @tparam BytesT Byte container for a single internal tuple field.
+     * @param type Element type.
+     * @param slice Optional value of an internal tuple field.
+     */
+    template <typename BytesT>
+    void append(ignite_type type, const std::optional<BytesT> &slice) {
+        if (slice.has_value()) {
+            append(type, slice.value());
+        } else {
+            append(std::nullopt);
+        }
+    }
+
+    /**
+     * @brief Appends values for a number of elements.
+     *
+     * @tparam BytesT Byte container for a single internal tuple field.
+     * @param schema Tuple schema.
+     * @param tuple Tuple in the internal form.
+     */
+    template <typename BytesT>
+    void append(const binary_tuple_schema &schema, const 
std::vector<std::optional<BytesT>> &tuple) {
+        for (IntT i = 0; i < schema.num_elements(); i++) {
+            append(schema.get_element(i).dataType, tuple[i]);
+        }
+    }
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_bytes(bytes_view bytes);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_int8(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
      * @param value Element value.
      */
-    void append_int8(std::int8_t value) { put_int8(value); }
+    void append_int8(std::int8_t value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_int16(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
      *
      * @param value Element value.
      */
-    void append_int16(std::int16_t value) { put_int16(value); }
+    void append_int16(std::int16_t value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_int32(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
      *
      * @param value Element value.
      */
-    void append_int32(std::int32_t value) { put_int32(value); }
+    void append_int32(std::int32_t value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_int64(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
      *
      * @param value Element value.
      */
-    void append_int64(std::int64_t value) { put_int64(value); }
+    void append_int64(std::int64_t value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_float(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
      *
      * @param value Element value.
      */
-    void append_float(float value) { put_float(value); }
+    void append_float(float value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_double(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
      *
      * @param value Element value.
      */
-    void append_double(double value) { put_double(value); }
+    void append_double(double value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_number(bytes_view bytes);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param value Big integer value.
+     */
+    void append_number(const big_integer &value);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param value Big decimal value.
+     */
+    void append_number(const big_decimal &value);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_uuid(bytes_view bytes);
+
+    /**
+     * @brief Writes specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
      *
      * @param value Element value.
      */
-    void append_uuid(uuid value) { put_uuid(value); }
+    void append_uuid(uuid value);
 
     /**
-     * @brief Appends a value for the next element.
+     * @brief Writes binary value of specified element.
      *
-     * @param type Element type.
-     * @param value Value of an internal tuple field.
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
      */
-    void append(ignite_type type, const bytes_view &bytes);
+    void append_date(bytes_view bytes);
 
     /**
-     * @brief Appends a value or null for the next element.
+     * @brief Writes binary value of specified element.
      *
-     * @tparam BytesT Byte container for a single internal tuple field.
-     * @param type Element type.
-     * @param slice Optional value of an internal tuple field.
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param value Date value.
      */
-    template <typename BytesT>
-    void append(ignite_type type, const std::optional<BytesT> &slice) {
-        if (slice.has_value()) {
-            append(type, slice.value());
-        } else {
-            append(std::nullopt);
-        }
-    }
+    void append_date(const ignite_date &value);
 
     /**
-     * @brief Appends values for a number of elements.
+     * @brief Writes binary value of specified element.
      *
-     * @tparam BytesT Byte container for a single internal tuple field.
-     * @param schema Tuple schema.
-     * @param tuple Tuple in the internal form.
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
      */
-    template <typename BytesT>
-    void append(const binary_tuple_schema &schema, const 
std::vector<std::optional<BytesT>> &tuple) {
-        for (IntT i = 0; i < schema.num_elements(); i++) {
-            append(schema.get_element(i).dataType, tuple[i]);
-        }
+    void append_time(bytes_view bytes);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param value Time value.
+     */
+    void append_time(const ignite_time &value);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_date_time(bytes_view bytes);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param value Date time value.
+     */
+    void append_date_time(const ignite_date_time &value);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param bytes Binary element value.
+     */
+    void append_timestamp(bytes_view bytes);
+
+    /**
+     * @brief Writes binary value of specified element.
+     *
+     * The written value may differ from the original because of value 
compression.
+     *
+     * @param value Timestamp value.
+     */
+    void append_timestamp(const ignite_timestamp &value);
+
+    /**
+     * @brief Appends a string for the next element.
+     *
+     * @param value Element value.
+     */
+    void append_string(const std::string &value) {
+        ignite::bytes_view bytes{reinterpret_cast<const std::byte 
*>(value.data()), value.size()};

Review Comment:
   Again, why do you use the ignite prefix here?



-- 
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