CASSANDRA-21415: Document COPY TO limitation for control characters in text columns#4856
Open
arvindKandpal-ksolves wants to merge 1 commit into
Open
Conversation
bschoening
requested changes
Jun 1, 2026
| accordance with RFC 4180. Text columns containing control characters | ||
| such as newlines (`\n`), carriage returns (`\r`), null bytes (`\x00`), | ||
| or other non-printable characters will not round-trip cleanly — values | ||
| will be corrupted on re-import via `COPY FROM`. If your data contains |
Contributor
There was a problem hiding this comment.
suggest: "cannot be reliably exported — values will be corrupted on re-import via COPY FROM"
bschoening
reviewed
Jun 1, 2026
| accordance with RFC 4180. Text columns containing control characters | ||
| such as newlines (`\n`), carriage returns (`\r`), null bytes (`\x00`), | ||
| or other non-printable characters will not round-trip cleanly — values | ||
| will be corrupted on re-import via `COPY FROM`. If your data contains |
Contributor
There was a problem hiding this comment.
There should be some mention of the security risks of binary data. Suggest this after COPY FROM:
Beyond data integrity, non-printable characters in CSV output can pose security risks,
including CSV injection and other forms of malicious data embedding.
…n text columns COPY TO does not support control characters in text column values per RFC 4180. This patch documents the limitation in the cqlsh reference, including the security risks and alternative tools for data migration. patch by Arvind Kandpal; reviewed by TBD for CASSANDRA-21415
7e24d84 to
8c3e428
Compare
Contributor
Author
|
Hi @bschoening , updated the title and description for the new jira ticket and also update the suggested changes. |
bschoening
approved these changes
Jun 2, 2026
Contributor
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
COPY TO does not support control characters (such as newlines, carriage
returns, or null bytes) in text column values. Any text column containing
these characters will be silently corrupted on round-trip — COPY TO
succeeds and COPY FROM succeeds, but the re-imported values differ from
the originals.
This patch documents that limitation clearly in the COPY TO section of
the cqlsh reference, in accordance with RFC 4180 which defines CSV
TEXTDATA as printable characters only. Users with such data are directed
to sstableloader for data migration instead.
patch by Arvind Kandpal; reviewed by for CASSANDRA-21415