ptupitsyn commented on code in PR #2004:
URL: https://github.com/apache/ignite-3/pull/2004#discussion_r1182449584


##########
modules/table/src/main/java/org/apache/ignite/internal/schema/marshaller/TupleMarshallerImpl.java:
##########
@@ -317,10 +332,45 @@ private static RowAssembler 
createAssembler(SchemaDescriptor schema, InternalTup
      * @param tup    Internal tuple.
      * @throws SchemaMismatchException If a tuple column value doesn't match 
the current column type.
      */
-    private void writeColumn(RowAssembler rowAsm, Column col, InternalTuple 
tup) throws SchemaMismatchException {
+    private static void writeColumn(RowAssembler rowAsm, Column col, 
InternalTuple tup) throws SchemaMismatchException {
         RowAssembler.writeValue(rowAsm, col, tup.value(col.name()));
     }
 
+    /**
+     * Determines whether binary tuple rebuild is required.
+     *
+     * @param schema Schema.
+     * @return True if binary tuple rebuild is required; false if the tuple 
can be written to storage as is.
+     */
+    private static boolean binaryTupleRebuildRequired(SchemaDescriptor schema) 
{
+        for (var col : schema.keyColumns().columns()) {
+            if (binaryTupleRebuildRequired(col)) {
+                return true;
+            }
+        }
+
+        for (var col : schema.valueColumns().columns()) {
+            if (binaryTupleRebuildRequired(col)) {
+                return true;
+            }
+        }
+
+        return false;

Review Comment:
   Good point. Added `SchemaDescriptor.hasTemporalColumns`. And the descriptor 
is already cached.



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