Numeric type casting of attributes nested in maps

Open
#120 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, ruby
Domain
databases

Research direction

Start by locating the aws-record attribute handling for float_attr and map_attr, then trace how the DynamoDB Ruby SDK returns numeric values from nested maps. Check whether nested map types can be declared and identify existing tests for attribute casting. Done means nested numeric values follow their declared type instead of remaining BigDecimal.

Written by the indexing model from the issue text.

Description

feature-request

We have float_attr and map_attr definitions, however there seems to be no way of defining the types of attributes nested in maps. I am currently reading a float out of a map and the result is a BigDecimal (0.2997e2 instead of 29.97), as per DynamoDB's Ruby SDK.

Is there any way to address this?

Dominant language
Ruby
Stars
318
Forks
44
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/aws-record-ruby

All issues in aws/aws-record-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.