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

FunctionState should omit empty fields to match the Java nullable fields #1184

Closed
freeznet opened this issue Feb 26, 2024 · 0 comments · Fixed by #1185
Closed

FunctionState should omit empty fields to match the Java nullable fields #1184

freeznet opened this issue Feb 26, 2024 · 0 comments · Fixed by #1185
Assignees

Comments

@freeznet
Copy link
Contributor

Expected behavior

var state FunctionState = FunctionState{
	ByteValue: []byte("hellopulsar\n"),
	Key:       "test-bytes",
}

The above FunctonState should be convert to JSON {"key":"test-bytes","byteValue":"aGVsbG9wdWxzYXIK"} and submit to pulsar functions worker API.

Actual behavior

The above FunctionState is been sent as JSON {"key":"test-bytes","stringValue":"","byteValue":"aGVsbG9wdWxzYXIK","numberValue":0,"version":0}

Steps to reproduce

When using PutFunctionState with pulsar-admin-go with pulsar 3.2.0, the submitted state will be overwritten by the empty stringValue and lose the byteValue.

System configuration

Pulsar version: 3.2.0

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

Successfully merging a pull request may close this issue.

1 participant