cuddly-jelly-27016
08/13/2025, 12:10 AMzero_value field in LiteralType to capture DataClasses default fields
Issue created by EngHabu
### Motivation: Why do you think this is important?
@dataclass
class MyOtherStruct:
i: int = 5
@workflow
def my_wf_with_defaults(a: MyOtherStruct) -> int:
return my_task()
`a`'s LiteralType would look something like this:
metadata -> json schema in proto struct format + default value i=5
structure -> json schema (no i=5)
type: scalar ... STRUCT
This makes it difficult for clients (e.g. FlyteConsole) to display the zero value for a.
### Goal: What should the final outcome look like, ideally?
message LiteralType {
...
Literal zero_value = ;
}
Flytekit should populate this value for DataClasses. I think for other types the zero value is just empty/null
This is not to be confused with "default value"...
### Describe alternatives you've considered
Parse metadata and extract field information from there...
### Propose: Link/Inline OR Additional context
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
08/13/2025, 12:10 AM