I don't understand why ALTER TYPE was even allowed initially. Apart from
very few corner cases, changing data type on existing data will lead to
disaster in many cases.
On Wed, Jan 11, 2017 at 12:20 PM, Tom van der Woerdt <
tom.vanderwoe...@booking.com> wrote:
> My understanding is that it's
My understanding is that it's safe... but considering "alter type" is going
to be removed completely (
https://issues.apache.org/jira/browse/CASSANDRA-12443), maybe not.
As for faster ways to do this: no idea :-(
Tom
On Wed, Jan 11, 2017 at 12:12 PM, Benjamin Roth
But it is safe to change non-primary-key columns from int to varint, right?
2017-01-11 10:09 GMT+01:00 Tom van der Woerdt
:
> Actually, come to think of it, there's a subtle serialization difference
> between varint and int that will break token generation (see
Wow okay! Fortunately I did not change the types, yet!
So there is no other way than reading the whole table and re-insert all
data?
Is there a faster way than doing all this with CQL? Like importing existing
SSTables directly into a new CF with the new column types?
2017-01-11 10:09 GMT+01:00
Actually, come to think of it, there's a subtle serialization difference
between varint and int that will break token generation (see bottom of
mail). I think it's a bug that Cassandra will allow this, so don't do this
in production.
You can think of varint encoding as regular bigints with all
Few! You saved my life, thanks!
For my understanding:
When creating a new table, is bigint or varint a better choice for storing
(up to) 64bit ints? Is there a difference in performance?
2017-01-11 9:39 GMT+01:00 Tom van der Woerdt :
> Hi Benjamin,
>
> bigint and
Hi Benjamin,
bigint and int have incompatible serialization types, so that won't work.
However, changing to 'varint' will work fine.
Hope that helps.
Tom
On Wed, Jan 11, 2017 at 9:21 AM, Benjamin Roth
wrote:
> Hi there,
>
> Does anyone know if there is a hack to