Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate .getFloat and .getInt in RichTableRow #162

Closed
echeran opened this issue Jun 2, 2016 · 1 comment
Closed

deprecate .getFloat and .getInt in RichTableRow #162

echeran opened this issue Jun 2, 2016 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@echeran
Copy link

echeran commented Jun 2, 2016

The BigQuery data types only has double-precision 64-bit integers and double-precision floating point values. In the BigQuery nomenclature, those types are referred to as INTEGER and FLOAT, however.

In the RichTableRow class containing implicit methods for TableRow, there are accessor methods to get field values from the row cast as JVM-world types, including: .getInt, .getLong, .getFloat, and .getDouble.

Since the BQ INTEGER corresponds to a Scala Long (not a Scala Int), and a BQ FLOAT corresponds to a Scala Double (not a Scala Float), something should be done to pre-empt confusion via precision mismatch or type casting errors.

Given Scio's general design to prefer choices in the direction of idiomatic Scala, it might make most sense to deprecate / get rid of .getFloat and .getInt.

@nevillelyh
Copy link
Contributor

Thanks and it's a great idea. Do you mind submitting a PR?

@nevillelyh nevillelyh added the enhancement New feature or request label Jun 7, 2016
@nevillelyh nevillelyh added this to the 0.2.0 milestone Jun 7, 2016
@nevillelyh nevillelyh self-assigned this Jun 7, 2016
nevillelyh added a commit that referenced this issue Jun 7, 2016
remove getFloat and getInt in RichTableRow #162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants