Skip to content

feat: workflow supports mapping from nested fields and to nested fields#97

Merged
shentongmartin merged 5 commits into
mainfrom
feat/nested_field_mapping
Mar 18, 2025
Merged

feat: workflow supports mapping from nested fields and to nested fields#97
shentongmartin merged 5 commits into
mainfrom
feat/nested_field_mapping

Conversation

@shentongmartin

@shentongmartin shentongmartin commented Mar 7, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this?

feat: workflow supports mapping from nested fields and to nested fields

  1. can create field mapping from fields of nested structs or nested maps
  2. can create field mapping to fields of nested structs or nested maps
  3. use a new set of API to create nested field mapping
  4. allow an intermediate level of the mapping 'source' to be an interface, will defer type check to request time:

e.g.

// the output of from_node_key is map[string]any.
// at request time, the value for key 'field1' is another map with a key 'field2'
// when Compiling the workflow, we only know the value type of the map is 'any'.
// So we will defer type checking to request time.
AddInput("from_node_key", FromFieldPath([]string{"field1", "field2"})

@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

📊 Coverage Report:

File coverage threshold (20%) satisfied:	PASS
Package coverage threshold (30%) satisfied:	PASS
Total coverage threshold (83%) satisfied:	PASS
Total test coverage: 83.7% (3442/4110)

Comment thread compose/field_mapping.go Outdated
Change-Id: Ibaa68e329283edadcd73663f9d04443093499b40
Change-Id: Id9257316619b44bcb21eff0d7a1c6d9e9c0b0832
Change-Id: I93e96a5ebebcf5fe3b4d3216c6ac260d68b9cbcf
@shentongmartin
shentongmartin force-pushed the feat/nested_field_mapping branch from 621adc2 to 4d04677 Compare March 13, 2025 06:35
Change-Id: Id0b1b4f340e82744ba27274625b5192bb4ce8e5f
@shentongmartin
shentongmartin force-pushed the feat/nested_field_mapping branch from 4d04677 to 2428ff1 Compare March 13, 2025 06:49
Change-Id: I556d8ae578648a0b977e56933a34ca701ecd25dd
Comment thread compose/field_mapping.go
Comment thread compose/field_mapping.go
@shentongmartin
shentongmartin merged commit b29656d into main Mar 18, 2025
@shentongmartin
shentongmartin deleted the feat/nested_field_mapping branch March 18, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants