[
https://issues.apache.org/jira/browse/CASSGO-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18073489#comment-18073489
]
Bohdan Siryk edited comment on CASSGO-118 at 4/14/26 2:24 PM:
--------------------------------------------------------------
Thanks [~smiklosovic], I thinking the same it's very unlikely anybody relies on
that, but we still can't 100% guaranty it - sometime ago I was wondering who
uses MapScan API until I discovered that Cadence does. I think this is
applicable to this case too.
After futher duscussion in Slack (1) we're leaning to adding a new option that
toggles the correct null-encoding behavior. To prevent breaking apps it will be
disabled by default. To prevent users from using buggy-behaivior we will log a
warning on a session init, so users will be aware of it. To supress the warning
users should explicitly choose the behavior they need. When there is 3.x
release we will change the default behavior to the correct one.
(1) -
https://the-asf.slack.com/archives/C05LPRVNZV1/p1776158394065259?thread_ts=1775481005.996919&cid=C05LPRVNZV1
was (Author: JIRAUSER306087):
Thanks [~smiklosovic], I thinking the same it's very unlikely anybody relies on
that, but we still can't 100% guaranty it - sometime ago I was wondering who
uses MapScan API until I discovered that Cadence does. I think this is
applicable to this case too.
After futher duscussion in Slack (1) we're leaning to adding a new option that
toggles the correct null-encoding behavior. To prevent breaking apps it will be
disabled by default. To prevent users from using buggy-behaivior we will log a
warning on a session init, so users will be aware of it. When there is 3.x
release we will change the default behavior to the correct one.
(1) -
https://the-asf.slack.com/archives/C05LPRVNZV1/p1776158394065259?thread_ts=1775481005.996919&cid=C05LPRVNZV1
> Nil map for UDT column inserts zero-valued UDT instead of NULL
> --------------------------------------------------------------
>
> Key: CASSGO-118
> URL: https://issues.apache.org/jira/browse/CASSGO-118
> Project: Apache Cassandra Go driver
> Issue Type: Bug
> Reporter: Bohdan Siryk
> Priority: Normal
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Inserting a row with a nil map for a UDT-typed column results in a non-NULL
> value whose fields behave like defaults / zero values, instead of storing
> NULL for the whole UDT.
> *Expected*
> The UDT column is NULL in DB.
> *Actual*
> The UDT column is present (not NULL) and fields appear as type defaults
> (empty string, 0, false, etc.).
> To reproduce it, please use this code snippet on github gist:
> https://gist.github.com/worryg0d/22810cd6609cae985ca5c53725c3e3ae
> You will have the following in your C*:
> {code:java}
> cqlsh> SELECT * from gocqltest.persons ;
> id | address | name
> ----+----------------------------------+---------
> 1 | {street: 'Street', zip: '12345'} | person1
> 2 | {street: null, zip: null} | person2
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]