Skip to content

Conversation

@ericf-firebolt
Copy link
Contributor

As stated, added decimal.Decimal to _types.py to support dbt.

@ericf-firebolt ericf-firebolt self-assigned this Jan 20, 2022
@ericf-firebolt ericf-firebolt changed the title Fix: Added decimal.Decimal to _types.py. fix: Added decimal.Decimal to _types.py. Jan 20, 2022
Copy link
Contributor

@stepansergeevitch stepansergeevitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add unit tests

@ericf-firebolt
Copy link
Contributor Author

Please also add unit tests

Decimal is a little weird/annoying in its inconsistency when converting numerical types vs strings, so I added two checks, one sending in a str, which returns a rather long string, and one sending in a numerical type—in this case a float—which returns a string with the same "significant digits" as the number that was input.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

78.1% 78.1% Coverage
0.0% 0.0% Duplication

@ericf-firebolt ericf-firebolt merged commit aa66c48 into main Jan 27, 2022
@ericf-firebolt ericf-firebolt deleted the add-decimal-data-type branch January 27, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants