Berkof commented on a change in pull request #452:
URL: https://github.com/apache/ignite-3/pull/452#discussion_r756580199



##########
File path: 
modules/schema/src/test/java/org/apache/ignite/internal/schema/marshaller/KvMarshallerTest.java
##########
@@ -161,7 +161,14 @@ public void pojoWithFieldsOfAllTypes(MarshallerFactory 
factory) throws Marshalle
     @ParameterizedTest
     @MethodSource("marshallerFactoryProvider")
     public void narrowType(MarshallerFactory factory) throws 
MarshallerException {
-        Column[] cols = columnsAllTypes();
+        Column[] cols = new Column[]{
+                new Column("primitiveIntCol", INT32, false),
+                new Column("primitiveLongCol", INT64, false),
+                new Column("primitiveFloatCol", FLOAT, false),
+                new Column("primitiveDoubleCol", DOUBLE, false),
+                new Column("stringCol", STRING, false),
+                new Column("uuidCol", UUID, false),
+        };
         
         SchemaDescriptor schema = new SchemaDescriptor(1, cols, cols);

Review comment:
       Yes, but u talking about unique columns, not unique fields or mapping. 
So I suppose it should be done with schema validation.

##########
File path: 
modules/schema/src/main/java/org/apache/ignite/internal/schema/marshaller/reflection/RecordMarshallerImpl.java
##########
@@ -59,11 +59,11 @@ public RecordMarshallerImpl(SchemaDescriptor schema, 
Mapper<R> mapper) {
         
         recClass = mapper.targetType();
         
-        keyMarsh = Marshaller.createMarshaller(schema.keyColumns().columns(), 
mapper);
+        keyMarsh = Marshaller.createMarshaller(schema.keyColumns().columns(), 
mapper, true);
         
         recMarsh = Marshaller.createMarshaller(
                 ArrayUtils.concat(schema.keyColumns().columns(), 
schema.valueColumns().columns()),
-                mapper
+                mapper, false

Review comment:
       At this particular row - yes, but at the previous line we check that all 
key columns have corresponding fields.

##########
File path: 
modules/schema/src/main/java/org/apache/ignite/internal/schema/Column.java
##########
@@ -178,6 +181,15 @@ public Object defaultValue() {
         return defValSup.get();
     }
 
+    /**
+     * Get no default value flag: {@code true} if column hasn't default value, 
{@code false} - otherwise.
+     *
+     * @return {@code true} if column hasn't default value, {@code false} - 
otherwise.

Review comment:
       removed

##########
File path: 
modules/schema/src/main/java/org/apache/ignite/internal/schema/Column.java
##########
@@ -30,6 +30,9 @@
  * user-defined order ({@link #columnOrder}).
  */
 public class Column implements Serializable {
+    /** Default "default value supplier". */
+    private static final Supplier<Object> NULL_SUPPLIER = () -> null;

Review comment:
       Remove Serializable from SchemaDescriptor, Columns, Column, NativeType, 
ColumnMapper, ColumnMapping.




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