Skip to content

refactor the reduce proto #96

@KeranYang

Description

@KeranYang

Below is the current reduce proto.

/**
 * ReduceResponse represents a response element.
 */
message ReduceResponse {
  // FIXME: put all fields(window, EOF) inside of Result. Reference: https://protobuf.dev/programming-guides/api/#dont-include-primitive-types
  // Result represents a result element. It contains the result of the reduce function.
  message Result {
    repeated string keys = 1;
    bytes value = 2;
    repeated string tags = 3;
  }

  Result result = 1;

  // window represents a window to which the result belongs.
  Window window = 2;

  // EOF represents the end of the response for a window.
  // When it's set to true, the platform considers the response as an indicator which doesn't contain real data.
  bool EOF = 3;
}

We should put all fields inside of the Result message. Reasoning: https://protobuf.dev/programming-guides/api/#dont-include-primitive-types

This requires changes at multiple places.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions