Database Reference
In-Depth Information
TSocket read 0 bytes (via cqlsh)
6.
To alter data type of indexed columns we need to rebuild them:
drop index age_idx;
alter table users alter age type int;
But please note that in such cases, it may result the data set being in
an incompatible state (see Figure 2-14 ).
Figure 2-14 . Error while changing data type to int from string
Here is the error:
Failed to decode value '51' (for column
'age') as int: unpack requires a string
argument of length 4
Failed to decode value '32' (for column
'age') as int: unpack requires a string
argument of length 4
Hence it is recommended to change data types on indexed
columns, when there is no data available for that column.
Indexes over collections are not supported in Cassandra 2.0. Fig-
ure 2-15 shows what happens if we try to create an index follower.
However, before this topic went to press, version 2.1 was released
and added this capability. See “Indexing on Collection Attributes” in
Chapter 11 .
Figure 2-15 . Indexes over collections are not supported in Cassandra 2.0
 
 
 
 
Search WWH ::




Custom Search