[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-8675: Status: Open (was: Patch Available) > COPY TO/FROM broken for newline characters > -- > > Key: CASSANDRA-8675 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools > Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native > protocol v3] > Ubuntu 14.04 64-bit >Reporter: Lex Lythius >Priority: Normal > Labels: cqlsh, remove-reopen > Fix For: 3.0.x > > Attachments: CASSANDRA-8675.patch, copytest.csv > > > Exporting/importing does not preserve contents when texts containing newline > (and possibly other) characters are involved: > {code:sql} > cqlsh:test> create table if not exists copytest (id int primary key, t text); > cqlsh:test> insert into copytest (id, t) values (1, 'This has a newline > ... character'); > cqlsh:test> insert into copytest (id, t) values (2, 'This has a quote " > character'); > cqlsh:test> insert into copytest (id, t) values (3, 'This has a fake tab \t > character (typed backslash, t)'); > cqlsh:test> select * from copytest; > id | t > +- > 1 | This has a newline\ncharacter > 2 |This has a quote " character > 3 | This has a fake tab \t character (entered slash-t text) > (3 rows) > cqlsh:test> copy copytest to '/tmp/copytest.csv'; > 3 rows exported in 0.034 seconds. > cqlsh:test> copy copytest from '/tmp/copytest.csv'; > 3 rows imported in 0.005 seconds. > cqlsh:test> select * from copytest; > id | t > +--- > 1 | This has a newlinencharacter > 2 | This has a quote " character > 3 | This has a fake tab \t character (typed backslash, t) > (3 rows) > {code} > I tried replacing \n in the CSV file with \\n, which just expands to \n in > the table; and with an actual newline character, which fails with error since > it prematurely terminates the record. > It seems backslashes are only used to take the following character as a > literal > Until this is fixed, what would be the best way to refactor an old table with > a new, incompatible structure maintaining its content and name, since we > can't rename tables? -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Shuler updated CASSANDRA-8675: -- Test and Documentation Plan: . Status: Patch Available (was: Open) > COPY TO/FROM broken for newline characters > -- > > Key: CASSANDRA-8675 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools > Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native > protocol v3] > Ubuntu 14.04 64-bit >Reporter: Lex Lythius >Priority: Normal > Labels: cqlsh, remove-reopen > Fix For: 3.0.x > > Attachments: CASSANDRA-8675.patch, copytest.csv > > > Exporting/importing does not preserve contents when texts containing newline > (and possibly other) characters are involved: > {code:sql} > cqlsh:test> create table if not exists copytest (id int primary key, t text); > cqlsh:test> insert into copytest (id, t) values (1, 'This has a newline > ... character'); > cqlsh:test> insert into copytest (id, t) values (2, 'This has a quote " > character'); > cqlsh:test> insert into copytest (id, t) values (3, 'This has a fake tab \t > character (typed backslash, t)'); > cqlsh:test> select * from copytest; > id | t > +- > 1 | This has a newline\ncharacter > 2 |This has a quote " character > 3 | This has a fake tab \t character (entered slash-t text) > (3 rows) > cqlsh:test> copy copytest to '/tmp/copytest.csv'; > 3 rows exported in 0.034 seconds. > cqlsh:test> copy copytest from '/tmp/copytest.csv'; > 3 rows imported in 0.005 seconds. > cqlsh:test> select * from copytest; > id | t > +--- > 1 | This has a newlinencharacter > 2 | This has a quote " character > 3 | This has a fake tab \t character (typed backslash, t) > (3 rows) > {code} > I tried replacing \n in the CSV file with \\n, which just expands to \n in > the table; and with an actual newline character, which fails with error since > it prematurely terminates the record. > It seems backslashes are only used to take the following character as a > literal > Until this is fixed, what would be the best way to refactor an old table with > a new, incompatible structure maintaining its content and name, since we > can't rename tables? -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Shuler updated CASSANDRA-8675: -- Fix Version/s: (was: 2.1.3) 3.0.x > COPY TO/FROM broken for newline characters > -- > > Key: CASSANDRA-8675 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools > Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native > protocol v3] > Ubuntu 14.04 64-bit >Reporter: Lex Lythius >Priority: Normal > Labels: cqlsh, remove-reopen > Fix For: 3.0.x > > Attachments: CASSANDRA-8675.patch, copytest.csv > > > Exporting/importing does not preserve contents when texts containing newline > (and possibly other) characters are involved: > {code:sql} > cqlsh:test> create table if not exists copytest (id int primary key, t text); > cqlsh:test> insert into copytest (id, t) values (1, 'This has a newline > ... character'); > cqlsh:test> insert into copytest (id, t) values (2, 'This has a quote " > character'); > cqlsh:test> insert into copytest (id, t) values (3, 'This has a fake tab \t > character (typed backslash, t)'); > cqlsh:test> select * from copytest; > id | t > +- > 1 | This has a newline\ncharacter > 2 |This has a quote " character > 3 | This has a fake tab \t character (entered slash-t text) > (3 rows) > cqlsh:test> copy copytest to '/tmp/copytest.csv'; > 3 rows exported in 0.034 seconds. > cqlsh:test> copy copytest from '/tmp/copytest.csv'; > 3 rows imported in 0.005 seconds. > cqlsh:test> select * from copytest; > id | t > +--- > 1 | This has a newlinencharacter > 2 | This has a quote " character > 3 | This has a fake tab \t character (typed backslash, t) > (3 rows) > {code} > I tried replacing \n in the CSV file with \\n, which just expands to \n in > the table; and with an actual newline character, which fails with error since > it prematurely terminates the record. > It seems backslashes are only used to take the following character as a > literal > Until this is fixed, what would be the best way to refactor an old table with > a new, incompatible structure maintaining its content and name, since we > can't rename tables? -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] C. Scott Andreas updated CASSANDRA-8675: Component/s: Tools > COPY TO/FROM broken for newline characters > -- > > Key: CASSANDRA-8675 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 > Project: Cassandra > Issue Type: Bug > Components: Tools > Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native > protocol v3] > Ubuntu 14.04 64-bit >Reporter: Lex Lythius >Priority: Major > Labels: cqlsh > Fix For: 2.1.3 > > Attachments: CASSANDRA-8675.patch, copytest.csv > > > Exporting/importing does not preserve contents when texts containing newline > (and possibly other) characters are involved: > {code:sql} > cqlsh:test> create table if not exists copytest (id int primary key, t text); > cqlsh:test> insert into copytest (id, t) values (1, 'This has a newline > ... character'); > cqlsh:test> insert into copytest (id, t) values (2, 'This has a quote " > character'); > cqlsh:test> insert into copytest (id, t) values (3, 'This has a fake tab \t > character (typed backslash, t)'); > cqlsh:test> select * from copytest; > id | t > +- > 1 | This has a newline\ncharacter > 2 |This has a quote " character > 3 | This has a fake tab \t character (entered slash-t text) > (3 rows) > cqlsh:test> copy copytest to '/tmp/copytest.csv'; > 3 rows exported in 0.034 seconds. > cqlsh:test> copy copytest from '/tmp/copytest.csv'; > 3 rows imported in 0.005 seconds. > cqlsh:test> select * from copytest; > id | t > +--- > 1 | This has a newlinencharacter > 2 | This has a quote " character > 3 | This has a fake tab \t character (typed backslash, t) > (3 rows) > {code} > I tried replacing \n in the CSV file with \\n, which just expands to \n in > the table; and with an actual newline character, which fails with error since > it prematurely terminates the record. > It seems backslashes are only used to take the following character as a > literal > Until this is fixed, what would be the best way to refactor an old table with > a new, incompatible structure maintaining its content and name, since we > can't rename tables? -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vincenzo Melandri updated CASSANDRA-8675: - Attachment: CASSANDRA-8675.patch > COPY TO/FROM broken for newline characters > -- > > Key: CASSANDRA-8675 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 > Project: Cassandra > Issue Type: Bug > Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native > protocol v3] > Ubuntu 14.04 64-bit >Reporter: Lex Lythius >Priority: Major > Labels: cqlsh > Fix For: 2.1.3 > > Attachments: CASSANDRA-8675.patch, copytest.csv > > > Exporting/importing does not preserve contents when texts containing newline > (and possibly other) characters are involved: > {code:sql} > cqlsh:test> create table if not exists copytest (id int primary key, t text); > cqlsh:test> insert into copytest (id, t) values (1, 'This has a newline > ... character'); > cqlsh:test> insert into copytest (id, t) values (2, 'This has a quote " > character'); > cqlsh:test> insert into copytest (id, t) values (3, 'This has a fake tab \t > character (typed backslash, t)'); > cqlsh:test> select * from copytest; > id | t > +- > 1 | This has a newline\ncharacter > 2 |This has a quote " character > 3 | This has a fake tab \t character (entered slash-t text) > (3 rows) > cqlsh:test> copy copytest to '/tmp/copytest.csv'; > 3 rows exported in 0.034 seconds. > cqlsh:test> copy copytest from '/tmp/copytest.csv'; > 3 rows imported in 0.005 seconds. > cqlsh:test> select * from copytest; > id | t > +--- > 1 | This has a newlinencharacter > 2 | This has a quote " character > 3 | This has a fake tab \t character (typed backslash, t) > (3 rows) > {code} > I tried replacing \n in the CSV file with \\n, which just expands to \n in > the table; and with an actual newline character, which fails with error since > it prematurely terminates the record. > It seems backslashes are only used to take the following character as a > literal > Until this is fixed, what would be the best way to refactor an old table with > a new, incompatible structure maintaining its content and name, since we > can't rename tables? -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8675: --- Tester: Philip Thompson COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cqlsh Fix For: 2.1.3 Attachments: copytest.csv Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name, since we can't rename tables? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8675: --- Reproduced In: 2.1.2 Fix Version/s: 2.1.3 Labels: cqlsh (was: cql) COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cqlsh Fix For: 2.1.3 Attachments: copytest.csv Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name, since we can't rename tables? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lex Lythius updated CASSANDRA-8675: --- Description: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name, since we can't rename tables? was: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name, since we can't rename tables? COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cql Attachments: copytest.csv Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lex Lythius updated CASSANDRA-8675: --- Description: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name? was: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name? COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cql Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lex Lythius updated CASSANDRA-8675: --- Description: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name, since we can't rename tables? was: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name? COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cql Attachments: copytest.csv Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 |
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lex Lythius updated CASSANDRA-8675: --- Attachment: copytest.csv COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cql Attachments: copytest.csv Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {code:sql} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {code} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8675) COPY TO/FROM broken for newline characters
[ https://issues.apache.org/jira/browse/CASSANDRA-8675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lex Lythius updated CASSANDRA-8675: --- Description: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name? was: Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: {{code}} cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote character 3 | This has a fake tab \t character (entered slash-t text) (3 rows) cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test cqlsh:test copy copytest to '/tmp/copytest.csv'; 3 rows exported in 0.034 seconds. cqlsh:test copy copytest from '/tmp/copytest.csv'; 3 rows imported in 0.005 seconds. cqlsh:test select * from copytest; id | t +--- 1 | This has a newlinencharacter 2 | This has a quote character 3 | This has a fake tab \t character (typed backslash, t) (3 rows) {{/code}} I tried replacing \n in the CSV file with \\n, which just expands to \n in the table; and with an actual newline character, which fails with error since it prematurely terminates the record. It seems backslashes are only used to take the following character as a literal Until this is fixed, what would be the best way to refactor an old table with a new, incompatible structure maintaining its content and name? COPY TO/FROM broken for newline characters -- Key: CASSANDRA-8675 URL: https://issues.apache.org/jira/browse/CASSANDRA-8675 Project: Cassandra Issue Type: Bug Components: Core Environment: [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3] Ubuntu 14.04 64-bit Reporter: Lex Lythius Labels: cql Exporting/importing does not preserve contents when texts containing newline (and possibly other) characters are involved: cqlsh:test create table if not exists copytest (id int primary key, t text); cqlsh:test insert into copytest (id, t) values (1, 'This has a newline ... character'); cqlsh:test insert into copytest (id, t) values (2, 'This has a quote character'); cqlsh:test insert into copytest (id, t) values (3, 'This has a fake tab \t character (typed backslash, t)'); cqlsh:test select * from copytest; id | t +- 1 | This has a newline\ncharacter 2 |This has a quote