Skip to content

Commit

Permalink
encode it as double
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Feb 7, 2024
1 parent c3a753d commit 321fa73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flow/model/qvalue/avro_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ func (c *QValueAvroConverter) ToAvroValue() (interface{}, error) {
}
return c.processNullableUnion("string", c.Value.Value)
case QValueKindFloat32:
return c.processNullableUnion("float", c.Value.Value)
if c.TargetDWH == QDWHTypeSnowflake || c.TargetDWH == QDWHTypeBigQuery {
return c.processNullableUnion("double", c.Value.Value)
}
return c.processNullableUnion("double", c.Value.Value)
case QValueKindFloat64:
if c.TargetDWH == QDWHTypeSnowflake || c.TargetDWH == QDWHTypeBigQuery {
if f32Val, ok := c.Value.Value.(float32); ok {
Expand Down

0 comments on commit 321fa73

Please sign in to comment.