{"id":18514008,"url":"https://github.com/daddye/gocqltest","last_synced_at":"2026-07-14T21:31:24.030Z","repository":{"id":24791852,"uuid":"28205657","full_name":"DAddYE/gocqltest","owner":"DAddYE","description":"Test nulls","archived":false,"fork":false,"pushed_at":"2014-12-19T06:25:09.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-27T10:08:45.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DAddYE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-18T23:11:40.000Z","updated_at":"2014-12-19T06:25:09.000Z","dependencies_parsed_at":"2022-08-22T16:50:38.012Z","dependency_job_id":null,"html_url":"https://github.com/DAddYE/gocqltest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DAddYE/gocqltest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fgocqltest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fgocqltest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fgocqltest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fgocqltest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAddYE","download_url":"https://codeload.github.com/DAddYE/gocqltest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAddYE%2Fgocqltest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35480618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T15:41:41.885Z","updated_at":"2026-07-14T21:31:24.005Z","avatar_url":"https://github.com/DAddYE.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## TEST NULL's issue\n\nIf you have at least one instance of cassandra running just:\n\n```\n$ go get github.com/daddye/gocqltest\n$ cd $GOPATH/src/github.com/daddye/gocqltest\n$ make\n```\n\nThis command will create drop/create the keyspace for and run the test.\n\n### The Test:\n\nSeems that `prepared` statements [[1]](https://github.com/gocql/gocql/issues/296) [[2]](https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/cHE3OOSIXBU/discussion) [[3]](https://issues.apache.org/jira/browse/CASSANDRA-7304)\n(defaults in gocql) suffers of a \"bug\" where *not* setting a *column* means setting it `NULL` which\ncauses the creation of a tombstone in cassandra if we do that query with prepared statements.\n\nThis problem _seems_ amplified with _arrays_ (slices). Basically an empty slice is `nil` for go and\nso `null` for cassandra. Again, if I understood correctly the\n[jira](https://issues.apache.org/jira/browse/CASSANDRA-7304) this in conjunction with prepared\nstatements would cause a creation of a tombstone.\n\nSo right now the output will be:\n\n```\ncqlsh -e \"DROP KEYSPACE IF EXISTS gocqltest\"\ncqlsh -f schema.cql\ngo run main.go\ncqlsh -e \"SELECT * FROM gocqltest.test\"\n\n id | categories | name | status\n----+------------+------+--------\n  5 |       null | null |   null\n 10 |       null | null |   null\n 16 |       null | null |   null\n 13 |       null | null |   null\n 11 |       null | null |   null\n  1 |       null | null |   null\n 19 |       null | null |   null\n  8 |       null | null |   null\n  0 |       null | null |   null\n  2 |       null | null |   null\n  4 |       null | null |   null\n 18 |       null | null |   null\n 15 |       null | null |   null\n  7 |       null | null |   null\n  6 |       null | null |   null\n  9 |       null | null |   null\n 14 |       null | null |   null\n 17 |       null | null |   null\n 12 |       null | null |   null\n  3 |       null | null |   null\n\n(20 rows)\n```\n\nWhich according to [jira](https://issues.apache.org/jira/browse/CASSANDRA-7304) would create\ntombstones (probably when you use more than one node) in cassandra since gocql comes with prepared\nstatements by default.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaddye%2Fgocqltest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaddye%2Fgocqltest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaddye%2Fgocqltest/lists"}