jhrotko commented on code in PR #903:
URL: https://github.com/apache/arrow-java/pull/903#discussion_r2509536099
##########
vector/src/main/java/org/apache/arrow/vector/extension/UuidType.java:
##########
@@ -14,24 +14,37 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.arrow.vector.types.pojo;
+package org.apache.arrow.vector.extension;
import org.apache.arrow.memory.BufferAllocator;
import org.apache.arrow.vector.FieldVector;
import org.apache.arrow.vector.FixedSizeBinaryVector;
import org.apache.arrow.vector.UuidVector;
+import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.ArrowType.ExtensionType;
+import org.apache.arrow.vector.types.pojo.ExtensionTypeRegistry;
+import org.apache.arrow.vector.types.pojo.FieldType;
public class UuidType extends ExtensionType {
+ public static final UuidType INSTANCE = new UuidType();
+
+ public static final String EXTENSION_NAME = "arrow.uuid";
+ public static final int UUID_BYTE_WIDTH = 16;
+ public static final int UUID_STRING_WIDTH = 36;
+ public static final ArrowType STORAGE_TYPE = new
ArrowType.FixedSizeBinary(UUID_BYTE_WIDTH);
+
+ static {
+ ExtensionTypeRegistry.register(INSTANCE);
+ }
Review Comment:
I am not sure, I see the method is only being used in tests for opaquetype.
Let me add tests for UuidType as well
--
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]