[
https://issues.apache.org/jira/browse/AVRO-3331?focusedWorklogId=719265&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-719265
]
ASF GitHub Bot logged work on AVRO-3331:
----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Feb/22 09:41
Start Date: 02/Feb/22 09:41
Worklog Time Spent: 10m
Work Description: martin-g opened a new pull request #1501:
URL: https://github.com/apache/avro/pull/1501
Introduce apache_avro::Decimal #from_f64 and #to_f64() which use the
configured/calculated scale to convert to/from BigInt
### Jira
- [X] My PR addresses the following [Avro
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them
in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-3331
- In case you are adding a dependency, check if the license complies with
the [ASF 3rd Party License
Policy](https://www.apache.org/legal/resolved.html#category-x) - added
`num-traits` dependency that is `MIT OR Apache-2.0`.
### Tests
- [X] My PR adds new unit tests
### Commits
- [X] My commits all reference Jira issues in their subject lines. In
addition, my commits follow the guidelines from "[How to write a good git
commit message](https://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [] TODO
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 719265)
Remaining Estimate: 0h
Time Spent: 10m
> Rust: Cannot extract Decimal value
> ----------------------------------
>
> Key: AVRO-3331
> URL: https://issues.apache.org/jira/browse/AVRO-3331
> Project: Apache Avro
> Issue Type: Bug
> Components: rust
> Reporter: Thomas Schilling
> Assignee: Martin Tzvetanov Grigorov
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The [Decimal|https://docs.rs/avro-rs/latest/avro_rs/struct.Decimal.html] type
> (as of 0.13) doesn't have any methods or trait implementations that allow
> users to extract the value. The only workaround I could think of would be to
> parse the output of the `Debug` implementation. But that's clearly very
> inefficient and fragile.
> The (unreleased?) version 0.14 also seems to have the same issue
> ([source|https://github.com/apache/avro/blob/master/lang/rust/src/decimal.rs]).
> It might just be enough to make the {{to_vec }}method public and specify how
> to interpret the result vector.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)