korlov42 commented on code in PR #3466:
URL: https://github.com/apache/ignite-3/pull/3466#discussion_r1539076882


##########
modules/marshaller-common/src/main/java/org/apache/ignite/internal/marshaller/MarshallerColumn.java:
##########
@@ -68,12 +70,32 @@ public MarshallerColumn(String name, BinaryMode type) {
      * @param defValSup Default value supplier.
      */
     public MarshallerColumn(String name, BinaryMode type, @Nullable 
Supplier<Object> defValSup, int scale) {

Review Comment:
   do we really need this constructor?



##########
modules/marshaller-common/src/main/java/org/apache/ignite/internal/marshaller/MarshallerColumn.java:
##########
@@ -68,12 +70,32 @@ public MarshallerColumn(String name, BinaryMode type) {
      * @param defValSup Default value supplier.
      */
     public MarshallerColumn(String name, BinaryMode type, @Nullable 
Supplier<Object> defValSup, int scale) {
+        this.schemaIndex = -1;
+        this.name = name;
+        this.type = type;
+        this.defValSup = defValSup == null ? NULL_SUPPLIER : defValSup;
+        this.scale = scale;
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param name      Column name.
+     * @param type      An instance of column data type.
+     * @param defValSup Default value supplier.

Review Comment:
   not all fields are covered by javadoc



##########
modules/marshaller-common/src/main/java/org/apache/ignite/internal/marshaller/Marshaller.java:
##########
@@ -267,13 +306,36 @@ public Object readObject(MarshallerReader reader, Object 
target) throws Marshall
             return obj;
         }
 
+        /** {@inheritDoc} */
+        @Override
+        public Object readValue(MarshallerReader reader, Object target) throws 
MarshallerException {

Review Comment:
   not sure I fully understand the difference between `readObject` and 
`readValue`... 



##########
modules/marshaller-common/src/main/java/org/apache/ignite/internal/marshaller/MarshallerReader.java:
##########
@@ -30,6 +30,18 @@
  * Binary reader.
  */
 public interface MarshallerReader {
+    /**
+     * Set reader's position to the given value.
+     */
+    void setIndex(int index);

Review Comment:
   if we want to extend MarshallerReader with ability to read arbitrary field, 
it's better to extend every `read` method with field index param rather that 
change its internal state every time.



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