Cassandra: text vs varchar

darcyq picture darcyq · Jul 8, 2013 · Viewed 28.9k times · Source

Does anyone know the difference between the two CQL data types text and varchar in Cassandra? The Cassandra documentation describes both types as "UTF-8 encoded string" and nothing more.

Answer

Lyuben Todorov picture Lyuben Todorov · Jul 8, 2013

text is just an alias for varchar!

The documentation:

EDIT
Here's the link to the C* 1.2 docs. The text vs varchar info is still the same, however this document contains some extra datatypes.

EDIT v2 Documentation links have been updated to the docs for C* 3. I couldn't find a good alternative for the C* 1.2 docs.