Skip to content

Commit

Permalink
support upstream STRUCT downstream JSON case
Browse files Browse the repository at this point in the history
Signed-off-by: Future-Outlier <[email protected]>
  • Loading branch information
Future-Outlier committed Aug 6, 2024
1 parent fa8bbd5 commit a503b8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flytepropeller/pkg/compiler/validators/typing.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func (t trivialChecker) CastsFrom(upstreamType *flyte.LiteralType) bool {
downstreamTypeCopy.Metadata = &structpb.Struct{}
upstreamTypeCopy.Annotation = &flyte.TypeAnnotation{}
downstreamTypeCopy.Annotation = &flyte.TypeAnnotation{}
// Handle upstream: STRUCT, downstream JSON
if upstreamTypeCopy.GetSimple() == flyte.SimpleType_STRUCT && downstreamTypeCopy.GetSimple() == flyte.SimpleType_JSON {
return true
}
return upstreamTypeCopy.String() == downstreamTypeCopy.String()
}

Expand Down

0 comments on commit a503b8b

Please sign in to comment.