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

[bug fix] objectType should work w/ or wo/ ENABLE_STRUCTURED_TYPES_IN_CLIENT_RESPONSE #1137

Merged
merged 3 commits into from
May 27, 2024

Conversation

madisonchamberlain
Copy link
Contributor

Description

If we get a snowflake object type, but we haven't set the flag ENABLE_STRUCTURED_TYPES_IN_CLIENT_RESPONSE, the code will panic because we are only setting the record on the batch if the snowflake type matches the expected arrow type. This will add support for the underlying type to be either structured or string for snowflake objectType, and if its neither, we will return an error with the underlying type rather than panic so we can fix it

Checklist

  • Created tests which fail without the change (if possible)
    • TestStructuredTypeInArrowBatchesWithoutEnablingStructureTypes: check that we can have an object type without setting structured types flag
    • TestNullObject: ensure that we can have a null object. (This is what was failing in my test suite; ultimately this isn't the actual trigger of the panic, but its still good to test because it could be one day)
  • [NA] Extended the README / documentation, if necessary

converter.go Outdated Show resolved Hide resolved
converter.go Outdated Show resolved Hide resolved
structured_type_read_test.go Outdated Show resolved Hide resolved
structured_type_read_test.go Outdated Show resolved Hide resolved
@sfc-gh-pfus sfc-gh-pfus merged commit 192b00b into snowflakedb:master May 27, 2024
40 of 69 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants