xtdb.vector.extensions.UuidVector.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xtdb-core Show documentation
Show all versions of xtdb-core Show documentation
An open source document database with bitemporal graph queries
The newest version!
package xtdb.vector.extensions
import org.apache.arrow.memory.BufferAllocator
import org.apache.arrow.vector.FixedSizeBinaryVector
import org.apache.arrow.vector.types.pojo.FieldType
import java.nio.ByteBuffer
import java.util.*
class UuidVector(name: String, allocator: BufferAllocator, fieldType: FieldType) :
XtExtensionVector(name, allocator, fieldType, FixedSizeBinaryVector(name, allocator, 16)) {
override fun getObject0(index: Int): UUID {
val bb = ByteBuffer.wrap(underlyingVector.getObject(index))
return UUID(bb.getLong(), bb.getLong())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy