diff --git a/flytepropeller/pkg/compiler/validators/typing.go b/flytepropeller/pkg/compiler/validators/typing.go index 2bde60b47b9..a1a23dadd8b 100644 --- a/flytepropeller/pkg/compiler/validators/typing.go +++ b/flytepropeller/pkg/compiler/validators/typing.go @@ -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() }