You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "waterWang (via GitHub)" <gi...@apache.org> on 2026/08/12 06:22:42 UTC
[PR] fix: allow empty DynamoDB list and map in AttributeValueCoder [beam]
waterWang opened a new pull request, #39734:
URL: https://github.com/apache/beam/pull/39734
### Problem
`AttributeValueCoder.encode` cannot encode a DynamoDB attribute whose value is an **empty list** or an **empty map** — it throws `CoderException("Unknown Type")`.
The `L` and `M` branches are guarded with `size() > 0`:
```java
} else if (value.l() != null && value.l().size() > 0) { // wrong: DynamoDB allows an empty L
} else if (value.m() != null && value.m().size() > 0) { // wrong: DynamoDB allows an empty M
```
### Fix
Remove the `size() > 0` guard for `L` and `M` branches. The `decode` side already handles empty lists and maps correctly via `ListCoder`/`MapCoder` — only `encode` rejects them.
### Blast radius
A single empty list nested anywhere inside an item makes the whole item unencodable, because `MAP_ATTRIBUTE_CODER` re-enters this coder for every child.
Fixes #39730
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: allow empty DynamoDB list and map in AttributeValueCoder [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39734:
URL: https://github.com/apache/beam/pull/39734#issuecomment-6267627763
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: allow empty DynamoDB list and map in AttributeValueCoder [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39734:
URL: https://github.com/apache/beam/pull/39734#issuecomment-6109192126
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: allow empty DynamoDB list and map in AttributeValueCoder [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39734:
URL: https://github.com/apache/beam/pull/39734#issuecomment-5263731758
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment `assign set of reviewers`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: allow empty DynamoDB list and map in AttributeValueCoder [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #39734: fix: allow empty DynamoDB list and map in AttributeValueCoder
URL: https://github.com/apache/beam/pull/39734
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org