Repository navigation
fix(#11959): gRPC ExecuteCommand honours projectionSettings like ExecuteQuery - #11976
shaunpatterson wants to merge 1 commit into
Conversation
… like ExecuteQuery
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Tick the box to add this pull request to the merge queue (same as
|
Up to standards ✅🟢 Issues
|
|
Triage: This fixes #11959.
Optional: |
|
Thanks for the triage. I added a body section on the one behaviour change. A client that already sent |
Fixes #11959.
Problem
executeCommandInternalnever readExecuteCommandRequest.projectionSettings(field 9). Every row went through a hard-codednew ProjectionConfig(true, PROJECTION_AS_JSON, 0), so a nested record came back asbytes_valueJSON (logical_type: "json") whatever encoding the client asked for. ExecuteQuery and StreamQuery honour the field.Change
projectionConfigOf(hasSettings, settings)inArcadeDbGrpcServicebuilds theProjectionConfig. ExecuteQuery, StreamQuery and ExecuteCommand all call it. It replaces the two duplicated builders (getProjectionConfig,getProjectionConfigFromRequest) and the hard-coded config in ExecuteCommand.Measured (E2E, grpcio 1.85.1,
proto_repros.py F5, container with this branch's grpcw jar)SELECT k, outE('E') AS oe FROM V WHERE k = 1, value ofoe[0]:{"@rid":"#4:0","@type":"E","w":1.5,...}{@rid: link, @type: "E", w: 1.5}(same as ExecuteQuery)#4:0(same as ExecuteQuery)Tests
Issue11959GrpcCommandProjectionIT: MAP and LINK over ExecuteCommand (MAP compared with ExecuteQuery's value), and the unset-field default (JSON bytes) on both RPCs. On main the MAP and LINK tests fail (BYTES_VALUE received) and the default test passes. With the fix all 3 pass.com/arcadedb/server/grpc/**): 938 run, 0 failed, 0 errors, 0 skipped.Behaviour change for clients that already send the field
A client that already set
projectionSettingson ExecuteCommand had it ignored until now. After this change the server applies it, so such a client gets different command output: the encoding it asked for,include_projectionsas sent (proto3 reads an unset bool asfalse, so a client that sets only the encoding now getsinclude_projections = false), and the soft limit, counted once per request. ArcadeDB's own Java client is not affected:RemoteGrpcDatabase.executeCommandsends no projection settings (onlyexecuteQuerydoes).Does not touch any file of #11920, #11967 or #11968.
Summary by CodeRabbit