[ https://issues.apache.org/jira/browse/CASSANDRA-18170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723536#comment-17723536 ]
Brandon Williams edited comment on CASSANDRA-18170 at 5/17/23 4:40 PM: ----------------------------------------------------------------------- [~smiklosovic] was this completed as part of CASSANDRA-18185? was (Author: brandon.williams): [~smiklosovic] was this completed as part of CASSANDRa-18185? > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org