question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cassandra null value is presented as zero for numeric types in result view

See original GitHub issue

The result view of DBeaver EE should differentiate between 0 and null of numeric types in cassandra. Both values are represented by 0.

Example:

CREATE KEYSPACE IF NOT EXISTS zeronull
WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }

USE zeronull

CREATE TABLE test (
    id int,
    a int,
    b float,
    c double,
    PRIMARY KEY (id)
)

truncate test

INSERT INTO test (id, a, b, c) values (0, null, 0, 1.0)

INSERT INTO test (id, a, b, c) values (1, 0, null, 2.0)

INSERT INTO test (id, a, b, c) values (2, null, 0, null)

select * from test

DBeaver shows:

id |a |b |c |
---|--|--|--|
1  |0 |0 |2 |
0  |0 |0 |1 |
2  |0 |0 |0 |

cqlsh shows:

 id | a    | b    | c
----+------+------+------
  1 |    0 | null |    2
  0 | null |    0 |    1
  2 | null |    0 | null

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Jan 17, 2017

Thanks for report

0reactions
serge-ridercommented, Dec 10, 2018

@costinpapuc thanks for the bug report. This bug will be fixed in the next version (5.3 hotfix actually)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cassandra: Searching for NULL values - cql - Stack Overflow
I updated my data model in cassandra as follows so that rssi1-rssi5 are now VARCHAR types. CREATE TABLE has.macrecord ( macadd text PRIMARY...
Read more >
Data Types | Apache Cassandra Documentation
CQL is a typed language and supports a rich set of data types, including native ... and that first increment/decrement is made as...
Read more >
MySQL IS NULL & IS NOT NULL Tutorial with EXAMPLES
The tutorial comprises of brief explanation on NULL value, NOT NULL value, NULL keywords and comparison of NULL values.
Read more >
How to replace NULL values with Default in Hive
Use nvl() function in Hive to replace all NULL values of a column with a default value, In this article, I will explain...
Read more >
Codec options :: DataStax Bulk Loader for Apache Cassandra
The value's precision is too large for the target CQL type. For example, trying to insert 0.1234567890123456789 into a CQL double results in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found