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

feat(c/driver/postgresql): customize numeric conversion #1521

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lupko
Copy link
Contributor

@lupko lupko commented Feb 6, 2024

  • introduces statement-level option adbc.postgresql.numeric_conversion
  • the option is used to tell result reader what strategy to use when converting numeric values to Arrow data; since this cannot be done 1-1, the reader has to convert to other data type
    • clients can use this option to specify the strategy
  • value can be either to_string or to_double
    • when not specified defaults to to_string
    • to_string -> numerics converted loss-less to string representation
    • when to_double -> numeric converted to double (with possible loss of precision)

- introduces statement-level option `adbc.postgresql.numeric_conversion`
- the option is used to tell result reader what strategy to use when converting numeric values to Arrow data; since this cannot be done 1-1, the reader has to convert to other data type
  - clients can use this option to specify the strategy
- value can be either `to_string` or `to_double`
  - when not specified defaults to `to_string`
  - `to_string` -> numerics converted loss-less to string representation
  - when `to_double` -> numeric converted to double (with possible loss of precision)
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.

2 participants