Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.77 KB

File metadata and controls

52 lines (42 loc) · 1.77 KB

What’s New in 7.2

Describes the new features and capabilities added to Hibernate ORM in 7.2.

Important
If migrating from earlier versions, be sure to also check out the Migration Guide for discussion of impactful changes.

Hibernate-Vector module enhancements

Support for binary, float16 and sparse vectors were added.

@Entity
public class MyEntity {
	@Id
	UUID id;
	@JdbcTypeCode(SqlTypes.VECTOR_BINARY)
	@Array(length = 24) // Refers to the bit count
	byte[] binaryVector;
	@JdbcTypeCode(SqlTypes.VECTOR_FLOAT16)
	@Array(length = 3)
	float[] float16Vector;
	@Array(length = 3)
	SparseFloatVector sparseFloat32Vector;
}

The Hibernate Vector module currently ships with 3 sparse vector types:

  • SparseByteVector

  • SparseFloatVector

  • SparseDoubleVector

In addition to accessing the sparse indices and values, they also implement the List interface to provide access as if it were a dense vector.

Also, support for vectors in the following databases was added: