Skip to content

feat(map): Implement Map Operation#202

Merged
ayushiahjolia merged 1 commit intomainfrom
map_feature_1_1
Mar 13, 2026
Merged

feat(map): Implement Map Operation#202
ayushiahjolia merged 1 commit intomainfrom
map_feature_1_1

Conversation

@ayushiahjolia
Copy link
Contributor

@ayushiahjolia ayushiahjolia commented Mar 12, 2026

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

Wire up the map() / mapAsync() API in DurableContext to a working MapOperation that executes user functions concurrently across collection items using child contexts.

Description

  • MapOperation: new class extending BaseConcurrentOperation that creates a ChildContextOperation branch per item via branchInternal(), with get() directly waiting on each branch and aggregating into BatchResult
  • MapConfig: add optional serDes field with fallback to handler default in DurableContext.mapAsync()
  • DurableContext: replace mapAsync() TODO stub with MapOperation wiring
  • OperationSubType: add MAP_ITERATION enum value for branch subtype
  • ChildContextOperation: consolidate MAP/MAP_ITERATION/PARALLEL/RUN_IN_CHILD_CONTEXT failure cases in get() switch
  • BaseConcurrentOperation: use sendOperationUpdateAsync in checkpointResult
  • MapIntegrationTest: two integration tests using LocalDurableTestRunner verifying simple map and map with durable steps inside branches

Next changes,

  • Parent checkpointing
  • maxConcurrency
  • CompletionConfig

Demo/Screenshots

Screenshot 2026-03-13 at 4 29 11 PM

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?
Added a basic test.

Examples

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

@ayushiahjolia ayushiahjolia requested a review from a team March 12, 2026 23:20
@ayushiahjolia ayushiahjolia self-assigned this Mar 12, 2026
@ayushiahjolia ayushiahjolia changed the title feat(map): Add MapFunction functional interface for map operations feat(map): Implement Map Operation Mar 13, 2026
@ayushiahjolia ayushiahjolia force-pushed the map_feature_1_1 branch 2 times, most recently from 4b9b032 to 9dda97d Compare March 13, 2026 22:48
Copy link
Contributor

@zhongkechen zhongkechen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. First working version of map

@ayushiahjolia ayushiahjolia merged commit e01f4d2 into main Mar 13, 2026
11 checks passed
@ayushiahjolia ayushiahjolia deleted the map_feature_1_1 branch March 13, 2026 23:32
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