RE: Inserting null values

2015-05-06 Thread Peer, Oded
: user@cassandra.apache.org Subject: Re: Inserting null values I agree that inserting null is not as good as not inserting that column at all when you have confidence that you are not shadowing any underlying data. But pragmatically speaking it really doesn't sound like a small number of incid

Re: Inserting null values

2015-05-06 Thread Eric Stevens
I agree that inserting null is not as good as not inserting that column at all when you have confidence that you are not shadowing any underlying data. But pragmatically speaking it really doesn't sound like a small number of incidental nulls/tombstones (< 20% of columns, otherwise CASSANDRA-3442 t

Re: Inserting null values

2015-04-29 Thread Robert Coli
On Wed, Apr 29, 2015 at 9:16 AM, Eric Stevens wrote: > In the end, inserting a tombstone into a non-clustered column shouldn't be > appreciably worse (if it is at all) than inserting a value instead. Or am > I missing something here? > There's thresholds (log messages, etc.) which operate on to

Re: Inserting null values

2015-04-29 Thread Philip Thompson
se the Insert query builder ( >>>> *com.datastax.driver.core.querybuilder.Insert*) which allows me to >>>> dynamically insert as many or as few columns as I need, and doesn’t require >>>> multiple prepared statements. Then, I will look at Ali’s suggestion – I >>>> w

Re: Inserting null values

2015-04-29 Thread Eric Stevens
IfNotNull’ and pump all >>> my values into that, which will then filter out the ones that are null. >>> Should keep the code nice and neat – I will feed back if I find any >>> problems with this approach (but please jump in if you have already spotted >>> any :)). >>>

Re: Inserting null values

2015-04-29 Thread Jonathan Haddad
‘addToInsertIfNotNull’ and pump all >> my values into that, which will then filter out the ones that are null. >> Should keep the code nice and neat – I will feed back if I find any >> problems with this approach (but please jump in if you have already spotted >> any :)). &g

Re: Inserting null values

2015-04-29 Thread Eric Stevens
at – I will feed back if I find any > problems with this approach (but please jump in if you have already spotted > any :)). > > > > Thanks! > > Matt > > > > *From:* Robert Wille [mailto:rwi...@fold3.com] > *Sent:* 29 April 2015 15:16 > *To:* user@cassandra.ap

RE: Inserting null values

2015-04-29 Thread Matthew Johnson
:)). Thanks! Matt *From:* Robert Wille [mailto:rwi...@fold3.com] *Sent:* 29 April 2015 15:16 *To:* user@cassandra.apache.org *Subject:* Re: Inserting null values I’ve come across the same thing. I have a table with at least half a dozen columns that could be null, in any combination. Having a

Re: Inserting null values

2015-04-29 Thread Robert Wille
I’ve come across the same thing. I have a table with at least half a dozen columns that could be null, in any combination. Having a prepared statement for each permutation of null columns just isn’t going to happen. I don’t want to build custom queries each time because I have a really cool syst

Re: Inserting null values

2015-04-29 Thread DuyHai Doan
The problem of NULL insert is already solved long time ago with Insert Strategy in Achilles: https://github.com/doanduyhai/Achilles/wiki/Insert-Strategy However, it's nice to see there will be a flag on the protocol side to handle this problem On Wed, Apr 29, 2015 at 2:27 PM, Ali Akhtar wrot

Re: Inserting null values

2015-04-29 Thread Ali Akhtar
Have you considered adding a 'toSafe' method which checks if the item is null, and if so, returns a default value? E.g String too = safe(bar, ""); . On Apr 29, 2015 3:14 PM, "Matthew Johnson" wrote: > Hi all, > > > > I have some fields that I am storing into Cassandra, but some of them > could be

RE: Inserting null values

2015-04-29 Thread Peer, Oded
Inserting a null value creates a tombstone. Tombstones can have major performance implications. You can see the tombstones using sstable2json. If you have a small number of records with null values this seems OK, otherwise I recommend using the QueryBuilder (for Java clients) and waiting for htt