isapego commented on code in PR #1287:
URL: https://github.com/apache/ignite-3/pull/1287#discussion_r1010100274


##########
modules/platforms/cpp/ignite/client/detail/table/table_impl.cpp:
##########
@@ -0,0 +1,715 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ignite/client/detail/table/table_impl.h"
+
+#include "ignite/protocol/bitset_span.h"
+#include "ignite/protocol/reader.h"
+#include "ignite/protocol/writer.h"
+#include "ignite/schema/binary_tuple_builder.h"
+#include "ignite/schema/binary_tuple_parser.h"
+#include "ignite/common/bits.h"
+#include "ignite/common/ignite_error.h"
+
+namespace ignite::detail {
+
+/**
+ * Claim space for the column.
+ *
+ * @param builder Binary tuple builder.
+ * @param typ Column type.
+ * @param index Tuple field index.
+ * @param tuple Tuple.
+ */
+void claim_column(binary_tuple_builder& builder, ignite_type typ, std::int32_t 
index, const ignite_tuple& tuple) {
+    switch (typ) {
+        case ignite_type::INT8:
+            builder.claim_int8(tuple.get<std::int8_t>(index));
+            break;
+        case ignite_type::INT16:
+            builder.claim_int16(tuple.get<std::int16_t>(index));
+            break;
+        case ignite_type::INT32:
+            builder.claim_int32(tuple.get<std::int32_t>(index));
+            break;
+        case ignite_type::INT64:
+            builder.claim_int64(tuple.get<std::int64_t>(index));
+            break;
+        case ignite_type::FLOAT:
+            builder.claim_float(tuple.get<float>(index));
+            break;
+        case ignite_type::DOUBLE:
+            builder.claim_double(tuple.get<double>(index));
+            break;
+        case ignite_type::UUID:
+            builder.claim_uuid(tuple.get<uuid>(index));
+            break;
+        case ignite_type::STRING:
+            builder.claim(SizeT(tuple.get<const std::string&>(index).size()));
+            break;
+        case ignite_type::BINARY:
+            builder.claim(SizeT(tuple.get<const 
std::vector<std::byte>&>(index).size()));
+            break;
+        default:
+            // TODO: Support other types

Review Comment:
   Already done. Seems I forgot to push, sorry



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