Revisit API of CqlVector value type

Description

https://datastax-oss.atlassian.net/browse/JAVA-3060 added initial support for the CQL “vector” type, including the value type CqlVector, the type object CqlVectorType and a codec CqlVectorCodec. There was some discussion on the PR for this ticket around various aspects of the interface of these classes, most prominently CqlVector. These included:

  • Interface for efficiently creating new instances. Builders are useful but heavyweight; can we do this in other ways while preserving the same goals?

    • Make sure we support for creation from lists as well as from an enumerated collection of subtype objects?

  • How to represent the immutability of the underlying collection type

  • CqlVector could and should be Iterable

    • Seems very little disagreement about this one

 

Due to time constraints we decided to hold off on these changes until a subsequent release. This ticket is intended to re-evaluate the design of this API and see if we can do it better.

Environment

None

Pull Requests

None

Activity

Show:

Bret McGuire 
June 27, 2023 at 3:49 PM

This wound up making a much bigger change. There is no longer a CqlVector class; we just return a List of some subtype for vector get operations (and expect the same for put operations).

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created June 2, 2023 at 10:43 PM
Updated September 20, 2023 at 5:03 PM
Resolved June 27, 2023 at 3:49 PM

Flag notifications