-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it a well-known issue that MessageSaver by default will just ignore the zero values? #354
Comments
Adding more info: Seeing from https://cloud.google.com/bigquery/docs/write-api#go_client, and testing with Google's write-api directly by using such helper code here, we can see that: With such a proto: message Row {
string Name = 1;
int32 Age = 2;
int64 LastSeen = 3; // timestamp in bigquery
} Plus such golang code to creating a message: var rows = []*Row{
{
Name: "John",
Age: 104,
LastSeen: time.Now().UnixMicro(),
},
{
Name: "Jane",
Age: 0,
LastSeen: time.Now().UnixMicro(),
},
{
Name: "Adam",
},
} By using the official write API, we get this written into the table: and the table schema is defined as: So perhaps we might want to keep the same behavior as the official package does here. |
@liufuyang optional int32 offset = 2; |
So for example, if I have some proto Message/Struct that has some zero values (such as an int=0 or a boolean = false), then those will not be able to store in BQ side but instead null values will be written in?
This is a demo PR shows the error:
#353
The text was updated successfully, but these errors were encountered: