Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor the reduce proto #96

Open
KeranYang opened this issue Jan 11, 2024 · 0 comments
Open

refactor the reduce proto #96

KeranYang opened this issue Jan 11, 2024 · 0 comments

Comments

@KeranYang
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant