sashapolo commented on code in PR #1076:
URL: https://github.com/apache/ignite-3/pull/1076#discussion_r974296036


##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/BinaryTuplePrefix.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.schema;
+
+import java.math.BigDecimal;
+import java.nio.ByteBuffer;
+import org.apache.ignite.internal.binarytuple.BinaryTuplePrefixBuilder;
+import org.apache.ignite.internal.binarytuple.BinaryTupleReader;
+import org.apache.ignite.internal.schema.row.InternalTuple;
+
+/**
+ * Class that represents a Binary Tuple Prefix.
+ *
+ * @see BinaryTuplePrefixBuilder BinaryTuplePrefixBuilder for information 
about the Binary Tuple Prefix format.
+ */
+public class BinaryTuplePrefix extends BinaryTupleReader implements 
InternalTuple {
+    /** Tuple schema. */
+    private final BinaryTupleSchema schema;
+
+    /**
+     * Constructor.
+     *
+     * @param schema Full Tuple schema.
+     * @param bytes Serialized representation of a Binary Tuple Prefix.
+     */
+    public BinaryTuplePrefix(BinaryTupleSchema schema, byte[] bytes) {
+        super(schema.elementCount() + 1, bytes);
+        this.schema = schema;
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param schema Full Tuple schema.
+     * @param buffer Serialized representation of a Binary Tuple Prefix.
+     */
+    public BinaryTuplePrefix(BinaryTupleSchema schema, ByteBuffer buffer) {
+        super(schema.elementCount() + 1, buffer);
+        this.schema = schema;
+    }
+
+    @Override
+    public int count() {
+        return elementCount();
+    }
+
+    @Override
+    public BigDecimal decimalValue(int index) {
+        return decimalValue(index, schema.element(index).decimalScale);
+    }
+
+    @Override
+    public int elementCount() {

Review Comment:
   As far as I understand, there's no difference, they simply come from 
different interfaces



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