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

JSON null not support as a value for VARIANT column #919

Open
waichee opened this issue Nov 26, 2024 · 1 comment
Open

JSON null not support as a value for VARIANT column #919

waichee opened this issue Nov 26, 2024 · 1 comment
Assignees

Comments

@waichee
Copy link

waichee commented Nov 26, 2024

Description

We have tried to insert JSON null value for a VARIANT column type but only able to create SQL null. There is a test for this in this codebase but the resultant column value created does not match the expectation.

Library version used

net.snowflake:snowflake-ingest-sdk:2.3.0

Steps to reproduce

Steps to reproduce using snowpipe streaming SDK

Example 1: setting null to the variant field named col1 in the Map sent to the sdk
JSON object inserted in app via snowpipe streaming SDK
Map entry: "col1",
Map value: null

Resultant Snowflake table
col1 returns SQL null

Expected results : col1 should return JSON null

Example 2: setting the col column to string "null"
JSON object inserted in app via snowpipe streaming SDK
Map entry: "col1",
Map value: "null"

Resultant Snowflake table (null string not JSON null)
col1 : "null"

@sfc-gh-rcheng sfc-gh-rcheng self-assigned this Dec 20, 2024
@sfc-gh-rcheng
Copy link
Collaborator

Thanks for raising this issue. We are currently investigating the issue, you're right in that the test doesn't seem to cover this use case correctly.

you could use is_null_value(xxx) is null, however it doesn't quite resolve the original issue

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

No branches or pull requests

2 participants