[ASTERIXDB-3469][OTH] Use AUUID length instead of 16
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Use AUUID.UUID_BYTES to get the length of
UUID bytes.
Ext-ref: MB-62909
Change-Id: I5c0b99c8810e2abd551978a3e0a36bbf2ad874b7
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18625
Reviewed-by: Wail Alkowaileet <wael.y.k@gmail.com>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Wail Alkowaileet <wael.y.k@gmail.com>
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java
index 135ed85..408ccbb 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java
@@ -19,12 +19,13 @@
package org.apache.asterix.column.assembler.value;
import org.apache.asterix.column.values.IColumnValuesReader;
+import org.apache.asterix.om.base.AUUID;
import org.apache.asterix.om.types.ATypeTag;
import org.apache.hyracks.data.std.api.IValueReference;
class UUIDValueGetter extends AbstractFixedLengthValueGetter {
UUIDValueGetter() {
- super(ATypeTag.UUID, 16);
+ super(ATypeTag.UUID, AUUID.UUID_BYTES);
}
@Override
@@ -34,4 +35,4 @@
uuid.getLength());
return value;
}
-}
\ No newline at end of file
+}
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java
index 741d9b3..a029d6f 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java
@@ -23,6 +23,7 @@
import org.apache.asterix.column.bytes.decoder.ParquetPlainFixedLengthValuesReader;
import org.apache.asterix.column.bytes.stream.in.AbstractBytesInputStream;
import org.apache.asterix.dataflow.data.nontagged.comparators.AUUIDPartialBinaryComparatorFactory;
+import org.apache.asterix.om.base.AUUID;
import org.apache.asterix.om.types.ATypeTag;
import org.apache.hyracks.data.std.api.IValueReference;
import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -32,8 +33,8 @@
private IValueReference nextValue;
public UUIDValueReader() {
- ArrayBackedValueStorage storage = new ArrayBackedValueStorage(16);
- storage.setSize(16);
+ ArrayBackedValueStorage storage = new ArrayBackedValueStorage(AUUID.UUID_BYTES);
+ storage.setSize(AUUID.UUID_BYTES);
uuidReader = new ParquetPlainFixedLengthValuesReader(storage);
}