Skip to content

Conversation

@adelapena
Copy link
Contributor

Thanks for sending a pull request! Here are some tips if you're new here:

  • Ensure you have added or run the appropriate tests for your PR.
  • Be sure to keep the PR description updated to reflect all changes.
  • Write your PR title to summarize what this PR proposes.
  • If possible, provide a concise example to reproduce the issue for a faster review.
  • Read our contributor guidelines
  • If you're making a documentation change, see our guide to documentation contribution

Commit messages should follow the following format:

<One sentence description, usually Jira title or CHANGES.txt summary>

<Optional lengthier description (context on patch)>

patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####

Co-authored-by: Name1 <email1>
Co-authored-by: Name2 <email2>

The Cassandra Jira

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the code we would need here? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not only. We would need something similar for authentication, but we can't use callOnInstance on upgrade tests. Also, as it's mentioned on that conversation we would also need a custom load balancing policy since the upgrade test involves multiple nodes. And, since upgrade tests are more sensitive to OOMs and timeouts, we would need to split the test. I have given it a go on top of 18069, on this commit. Some repeated runs can be found here.

Allows to attach the native masking functions added by CASSANDRA-17941 to the definitions of
table columns in the schema, as defined by CEP-20. The functions masking a column can be
specified on CREATE TABLE queries, right at the end of the column definition. The mask of a
column can also be changed or dropped with an ALTER TABLE query. Once a column is masked,
SELECT queries will always return the masked value of the column. That masking is done on the
coordinator, at the end of the query execution. Thus, masking won't affect any filters or
ordering, which would be based on the clear values of the masked columns. Column masks are
stored on the system table system_schema.column_masks.

patch by Andrés de la Peña; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-18068
@adelapena adelapena force-pushed the 18071-trunk branch 3 times, most recently from 85fe09f to bea876f Compare March 6, 2023 20:10
The new permission allows to see the clear data of columns with an attached mask.
Superusers have it by default, whereas regular users don't have it.

patch by Andrés de la Peña; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-18069
The new permission allows to run SELECT queries restricting the clear values of masked columns.
Superusers have it by default, whereas regular users don't have it.

patch by Andrés de la Peña; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-18070
patch by Andrés de la Peña; reviewed by Benjamin Lerer and Berenguer Blasi for CASSANDRA-18071
Copy link
Contributor

@blerer blerer left a comment

Choose a reason for hiding this comment

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

Could you add a test that use an UDF from another keyspace?

Comment on lines 124 to 127
String dependentMasks = keyspace.tables.stream()
.filter(table -> hasDependingMask(table, function))
.map(table -> table.name)
.collect(joining(", "));
Copy link
Contributor

Choose a reason for hiding this comment

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

The approach that is mostly use within the code base is to delegate that type of call to the classes themselves. See dependentAggregates bellow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just tried to do that with two new KeyspaceMetadata#tablesUsingFunction(Function) and TableMetadata#dependsOn(Function) methods.

@adelapena
Copy link
Contributor Author

Could you add a test that use an UDF from another keyspace?

That's already tested here.

@belliottsmith belliottsmith force-pushed the trunk branch 2 times, most recently from df3eb40 to 54e39a9 Compare July 23, 2025 11:19
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.

3 participants