Skip to content

feat(map): Rename BatchResult to MapResult, use MapResultItem, reorder MapFunction params#217

Merged
zhongkechen merged 1 commit intomainfrom
map_doc_update
Mar 16, 2026
Merged

feat(map): Rename BatchResult to MapResult, use MapResultItem, reorder MapFunction params#217
zhongkechen merged 1 commit intomainfrom
map_doc_update

Conversation

@ayushiahjolia
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

#39

Description

  • Rename BatchResult to MapResult and replace the two separate lists (results, errors) with a single List<MapResultItem> where each item holds status, result, and error. This gives callers a unified per-item view instead of correlating parallel lists by index.
  • Remove Jackson-specific annotations (@JsonProperty, @JsonCreator, @JsonIgnore) from the result model. Use Java bean conventions (default constructor + getters) so MapResult and MapResultItem work with any customer-provided SerDes implementation, not just Jackson.
  • Move DurableContext to the last parameter in MapFunction.apply() to stay consistent with other user-provided functions in the SDK: from apply(DurableContext context, I item, int index) to apply(I item, int index, DurableContext context)
  • Update all call sites across SDK, integration tests, examples, and documentation.

Demo/Screenshots

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? N/A

Integration Tests

Have integration tests been written for these changes? N/A

Examples

Has a new example been added for the change? (if applicable) N/A

@ayushiahjolia ayushiahjolia requested a review from a team March 16, 2026 19:38
@zhongkechen zhongkechen merged commit bc57488 into main Mar 16, 2026
12 checks passed
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 this pull request may close these issues.

2 participants