Skip to content

Commit

Permalink
use protobuf struct instead of struct protobuf
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 26, 2024
1 parent 2e4ea24 commit 4559ad7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rfc/system/5606-json-idl.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Use byte string in protobuf instead of json string to fix case that int is not s

## 2 Motivation

In Flytekit, when handling dataclasses, Pydantic base models, and dictionaries, we store data using JSON strings within struct protobuf.
This approach causes issues with integers, as protobuf does not support int types, leading to their conversion to floats.
In Flytekit, when handling dataclasses, Pydantic base models, and dictionaries, we store data using JSON strings within protobuf struct datatype.
This approach causes issues with integers, as protobuf struct does not support int types, leading to their conversion to floats.
This results in performance issues since we need to recursively iterate through all attributes/keys in dataclasses and dictionaries to ensure floats types are converted to int. In addition to performance issues, the required code is complicated and error prone.

Note: We have more than 10 issues about dict, dataclass and Pydantic.
Expand Down

0 comments on commit 4559ad7

Please sign in to comment.