liu-du commented on pull request #16926:
URL: https://github.com/apache/beam/pull/16926#issuecomment-1048496925


   
   Hmm, the problem is in `TableRowToStorageApiProto.scalarToProtoValue`. Let's 
say it needs to convert "2019-08-16", all `scalarToProtoValue` knows is that it 
is a protobuf string, it doesn't know whether it's actually a BigQuery DATE or 
it's just a BigQuery STRING... To make it work, we need to also pass in 
BigQuery type to `scalarToProtoValue`, so it's signature needs to change from 
`scalarToProtoValue(FieldDescriptor fieldDescriptor, Object jsonBQValue)` to 
`scalarToProtoValue(TableFieldSchema tableFieldSchema, FieldDescriptor 
fieldDescriptor, Object jsonBQValue)`.
   
   What do you think of this approach?  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to