Skip to content

CASSANDRA-21415: Document COPY TO limitation for control characters in text columns#4856

Closed
arvindKandpal-ksolves wants to merge 2 commits into
apache:trunkfrom
arvindKandpal-ksolves:CASSANDRA-21381-docs
Closed

CASSANDRA-21415: Document COPY TO limitation for control characters in text columns#4856
arvindKandpal-ksolves wants to merge 2 commits into
apache:trunkfrom
arvindKandpal-ksolves:CASSANDRA-21381-docs

Conversation

@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor

@arvindKandpal-ksolves arvindKandpal-ksolves commented Jun 1, 2026

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

Comment thread doc/modules/cassandra/pages/managing/tools/cqlsh.adoc Outdated
Comment thread doc/modules/cassandra/pages/managing/tools/cqlsh.adoc Outdated
Comment thread doc/modules/cassandra/pages/managing/tools/cqlsh.adoc Outdated
@arvindKandpal-ksolves arvindKandpal-ksolves changed the title CASSANDRA-21381: Document COPY TO limitation for control characters in text columns CASSANDRA-21415: Document COPY TO limitation for control characters in text columns Jun 2, 2026
…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
@arvindKandpal-ksolves
Copy link
Copy Markdown
Contributor Author

Hi @bschoening , updated the title and description for the new jira ticket and also update the suggested changes.

@bschoening
Copy link
Copy Markdown
Contributor

+1

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Cassandra documentation to clearly describe a known limitation of cqlsh COPY TO: text values containing control/non-printable characters do not round-trip correctly through CSV export/import.

Changes:

  • Adds a NOTE admonition under the COPY TO documentation describing the control-character round-trip corruption behavior.
  • Suggests alternative migration tools for data containing such characters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/modules/cassandra/pages/managing/tools/cqlsh.adoc Outdated
Comment thread doc/modules/cassandra/pages/managing/tools/cqlsh.adoc
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@smiklosovic smiklosovic closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants