(WIP) Stargate V2 REST API compatibility concerns #1501
tatu-at-datastax
started this conversation in
RFCs
Replies: 1 comment
-
Completed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This discussion is based on an earlier Google document and tries to keep track of issues, concerns between Stargate V1 and V2 versions of REST API.
Endpoint descriptions refer to SGv2 status
REST API: general/internal
Although most if not all Integration tests pass, some features and datatypes have no coverage in SGv1 or SGv2.
Here are known issues with completeness.
Support for operators for "where" clauses
All operations -- simple like $EQ, $LT, $LTE, $GT, $GTE and complex $IN ,$EXISTS, $CONTAINS, $CONTAINSKEY, $CONTAINSENTRY have been implemented.
However it is worth noting that:
$EXISTS
implementation does make much sense: it gets translated by REST API to be equivalent to "boolean column C has valuetrue
" -- different from interpretation by Documents API (or MongoDB)$CONTAINS
(and related) implementation only allows single value checks: an array is accepted by API but fails to execute successfully ("... must enable ALLOW FILTERING"). Documents API likely allows this case.Converting to Bridge/gRPC types (PUT, GET-with-where)
All simple types and most structured types supported.
Only TUPLE is not yet supported.
Code in
io.stargate.sgv2.restsvc.grpc.ToProtoValueCodecs
Converting from Bridge/gRPC types (GET results)
All simple types and most structured types supported.
Only TUPLE is not yet supported.
Code in
io.stargate.sgv2.restsvc.grpc.FromProtoValueCodecs
REST API: Data endpoints
All data endpoints have been implemented but some gaps and incompatibilities exist.
Known issues listed below.
Rows
GET row(s) by PK (/v2/keyspaces/{keyspaceName}/{tableName}/{primaryKey})
No known compatibility or test coverage issues specific to this endpoint.
Schema access: required when building query, to bind positional “primaryKey” segments into column names in CQL.
Response binding can use column metadata returned by gRPC service
GET all rows (/v2/keyspaces/{keyspaceName}/{tableName}/rows)
No known compatibility or test coverage issues specific to this endpoint.
Schema access: None needed since response bindings can use metadata returned
GET rows by where (search) (/v2/keyspaces/{keyspaceName}/{tableName})
No known compatibility or test coverage issues specific to this endpoint, aside from notes on "where clauses" earlier.
Schema access: required when building query for binding values of "Where" clause.
Response binding can use column metadata returned by gRPC service
POST add row (/v2/keyspaces/{keyspaceName}/{tableName})
API/specification issues:
Schema access: needed to bind incoming JSON values into stricter gRPC types.
PUT replace row (/v2/keyspaces/{keyspaceName}/{tableName}/{primaryKey})
No known compatibility or test coverage issues specific to this endpoint.
PATCH update row (/v2/keyspaces/{keyspaceName}/{tableName}/{primaryKey})
No known compatibility or test coverage issues specific to this endpoint.
DELETE row(s) (/v2/keyspaces/{keyspaceName}/{tableName}/{primaryKey})
No known compatibility or test coverage issues specific to this endpoint.
REST API: Schema endpoints
Schema/Column endpoints
GET a column: (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/columns/{columnName})
No known compatibility or test coverage issues specific to this endpoint.
GET all columns: (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/columns)
No known compatibility or test coverage issues specific to this endpoint.
POST create column: (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/columns)
No known compatibility or test coverage issues specific to this endpoint.
PUT update column: (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/columns/{columnName})
No known compatibility or test coverage issues specific to this endpoint.
DELETE a column (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/columns/{columnName})
No known compatibility or test coverage issues specific to this endpoint.
Schema/Index endpoints
GET all indexes for table (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/indexes)
API/specification issues:
Dumps the raw contents of system_schema indexes, instead of building a structured representation (like keyspaces).
This is the way it was implemented in v1 so we're stuck with it if we want to maintain backward compatibility.
POST add an index to a column (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/indexes)
No known compatibility or test coverage issues specific to this endpoint.
DELETE an index (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName}/indexes/{indexName})
No known compatibility or test coverage issues specific to this endpoint.
Schema/Keyspace endpoints
General notes: The initial implementation of endpoints does NOT use Bridge/gRPC schema operations but “plain” CQL.
GET a keyspace (/v2/schemas/keyspaces/{keyspaceName})
No known compatibility or test coverage issues specific to this endpoint.
GET all keyspaces (/v2/schemas/keyspaces)
No known compatibility or test coverage issues specific to this endpoint.
POST create keyspace (/v2/schemas/keyspaces)
No known compatibility or test coverage issues specific to this endpoint.
DELETE a keyspace (/v2/schemas/keyspaces/{keyspaceName})
No known compatibility or test coverage issues specific to this endpoint.
Schema/Table endpoints
GET a table (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName})
No known compatibility or test coverage issues specific to this endpoint.
GET all tables (/v2/schemas/keyspaces/{keyspaceName}/tables)
No known compatibility or test coverage issues specific to this endpoint.
POST create table (/v2/schemas/keyspaces/{keyspaceName}/tables)
No known compatibility or test coverage issues specific to this endpoint.
PUT replace table (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName})
No known compatibility or test coverage issues specific to this endpoint.
DELETE a table (/v2/schemas/keyspaces/{keyspaceName}/tables/{tableName})
No known compatibility or test coverage issues specific to this endpoint.
Schema/UDT endpoints
GET a UDT (/v2/schemas/keyspaces/{keyspaceName}/types/{typeName})
No known compatibility or test coverage issues specific to this endpoint.
GET ALL UDTs of a keyspace (/v2/schemas/keyspaces/{keyspaceName}/types)
No known compatibility or test coverage issues specific to this endpoint.
POST create UDT (/v2/schemas/keyspaces/{keyspaceName}/types)
No known compatibility or test coverage issues specific to this endpoint.
PUT update UDT (/v2/schemas/keyspaces/{keyspaceName}/types)
No known compatibility or test coverage issues specific to this endpoint.
DELETE a UDT (/v2/schemas/keyspaces/{keyspaceName}/types/{typeName})
No known compatibility or test coverage issues specific to this endpoint.
Beta Was this translation helpful? Give feedback.
All reactions