Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraints blog post #286

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

bbotella
Copy link

@bbotella bbotella commented Feb 3, 2025

No description provided.

------
[openblock,card-content]
------
Introducting the Cassandra Constraints Framework, a new feature that allows users to define data validation rules at write time.

Choose a reason for hiding this comment

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

Typo: Introducting -> Introducing

:description: The Apache Cassandra Community
:keywords:

Casandra has had limited tools to handle value limits and rules at the time of writing data to a table. Constraints Framework positions itself as the center piece to provide an easy approach to be able to define those rules that gives such flexibility to both Cassandra users and operators by adding a framework to define generic checks at write time.

Choose a reason for hiding this comment

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

Typo: Casandra -> Cassandra

:description: The Apache Cassandra Community
:keywords:

Casandra has had limited tools to handle value limits and rules at the time of writing data to a table. Constraints Framework positions itself as the center piece to provide an easy approach to be able to define those rules that gives such flexibility to both Cassandra users and operators by adding a framework to define generic checks at write time.
Copy link

@himanshujindal himanshujindal Feb 7, 2025

Choose a reason for hiding this comment

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

The paragraph seems hard to read. I used a LLM to simplify this - "Cassandra has had limited tools to handle value limits and rules when writing data to tables. The Constraints Framework positions itself as a centerpiece, providing an easy approach to define rules that give flexibility to both Cassandra users and operators by adding a framework for generic checks at write time." It made the following changes:

  • Fixed spelling of "Cassandra"
  • Changed "at the time of writing" to "when writing"
  • Added "The" before "Constraints Framework"
  • Changed "center piece" to "centerpiece"
  • Improved flow by restructuring parts of the sentence
  • Fixed subject-verb agreement ("gives" to "give")
  • Minor phrasing improvements for clarity

Comment on lines +28 to +43
----
CREATE TABLE keyspace.table (
name text,
i int CHECK (condition)
...,
);
----

Altering Existing Constraints:
----
ALTER TABLE [IF EXISTS] <table> ALTER [IF EXISTS] <column> CHECK <condition>;
----
Dropping Constraints:
----
ALTER TABLE [IF EXISTS] <table> ALTER [IF EXISTS] <column> DROP CHECK;
----
Copy link

@himanshujindal himanshujindal Feb 7, 2025

Choose a reason for hiding this comment

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

It would be nice if these were actual examples. If we only want to show syntax, we should change the sentence to "Here is the syntax on how to use constraints in CQL:". I would prefer an actual example here, with a link to a CQL doc showing syntax.

Copy link

@himanshujindal himanshujindal left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. I had no idea about the feature before reviewing the PR, and after reading this, I have a good idea of the feature. Some comments around typo and grammar.
PS: I don't know much about the feature, so I can't attest to the correctness of the blog. :)

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.

2 participants