[
https://issues.apache.org/jira/browse/AVRO-3678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641175#comment-17641175
]
ASF subversion and git services commented on AVRO-3678:
-------------------------------------------------------
Commit 6eb72341912ac3858f56531e457de77213eafd02 in avro's branch
refs/heads/branch-1.11 from Martin Grigorov
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=6eb723419 ]
AVRO-3678: [Rust] Support writing float value to field defined as double (#1991)
Originally contributed by @shaeqahmed with #1985
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
(cherry picked from commit b8897c60ce990d15564a850e3aaf22945c4e7788)
> [Rust] Support write float value to field defined as double
> -----------------------------------------------------------
>
> Key: AVRO-3678
> URL: https://issues.apache.org/jira/browse/AVRO-3678
> Project: Apache Avro
> Issue Type: New Feature
> Components: rust
> Reporter: Shaeq Ahmed
> Assignee: Shaeq Ahmed
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.12.0, 1.11.2
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> [https://github.com/apache/avro/blob/b8937526d32928b3b29040e862f7689d7230bddb/lang/rust/avro/src/types.rs#L405]
> Currently a Avro value of the type float (32) cannot be resolved against a
> schema where the type is defined as double (64). We already support type
> widening from int -> long (dest. schema) as this is completely lossless, so I
> think we should also support the same for float -> double for consistency &
> convenience as this is a common use case.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)