8000 fix: correct the numeric literal dtype by chelsea-lin · Pull Request #365 · googleapis/python-bigquery-dataframes · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@chelsea-lin
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a internal bug
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes internal bug: b/323070618 🦕

@chelsea-lin chelsea-lin requested review from a team as code owners February 1, 2024 22:56
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Feb 1, 2024
scalar_expr = ibis.literal(literal, ibis_dtypes.float64)
elif scalar_expr.type().is_integer():
scalar_expr = ibis.literal(literal, ibis_dtypes.int64)
elif scalar_expr.type().is_decimal():
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would break BIGNUMERIC, I think. We should probably have something that goes to the nearest type. https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types

Like is_decimal and precision < 76, then this otherwise set to the precision and scale for BIGNUMERIC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point! thanks!

@chelsea-lin chelsea-lin force-pushed the main_chelsealin_taxibug branch 2 times, most recently from eb3489e to 68108ac Compare February 12, 2024 23:16
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_taxibug branch from 68108ac to f81077a Compare February 13, 2024 18:14
@chelsea-lin chelsea-lin merged commit 93b02cd into main Feb 14, 2024
@chelsea-lin chelsea-lin deleted the main_chelsealin_taxibug branch February 14, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0