[
https://issues.apache.org/jira/browse/CASSANDRA-18170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams updated CASSANDRA-18170:
-----------------------------------------
Status: Open (was: Patch Available)
> Document cqlsh single quote escaping behavior on complex vs simple types
> ------------------------------------------------------------------------
>
> Key: CASSANDRA-18170
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18170
> Project: Cassandra
> Issue Type: Task
> Components: Documentation, Tool/cqlsh
> Reporter: Paulo Motta
> Assignee: Yaman Ziadeh
> Priority: Normal
>
> cqlsh escapes single quotes on complex types but not on text types:
> Table: {{CREATE TABLE test (name text, foo map<text,text>, PRIMARY
> KEY(name));}}
> Insert: {code}INSERT INTO test (name, foo) VALUES (
> 'jos''emy',{'foo':'josemy''s houñse'});{code}
> Query: {{SELECT * FROM test;}}
> {code}
> name | foo
> -----------+-----------------------------
> jos'emy | {'foo': 'josemy''s houñse'}
> {code}
> This behavior is confusing because simple text fields containing single
> quotes are not escaped on cqlsh, while complex types (such as collections or
> UDTs) are escaped. A couple of tickets were created to clarify this behavior:
> CASSANDRA-10263 and CASSANDRA-15458.
> We should probably document this behavior on cqlsh documentation to avoid
> confusion.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]