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
[X] 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
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 itChecklist
TestStructuredTypeInArrowBatchesWithoutEnablingStructureTypes
: check that we can have an object type without setting structured types flagTestNullObject
: 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)