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

Create collection mixed casing fix #1117

Merged
merged 8 commits into from
May 28, 2024

Conversation

maheshrajamani
Copy link
Contributor

@maheshrajamani maheshrajamani commented May 24, 2024

What this PR does:
Create collection mixed casing fix

Which issue(s) this PR fixes:
Fixes #1110

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@maheshrajamani maheshrajamani self-assigned this May 24, 2024
@maheshrajamani maheshrajamani requested a review from a team as a code owner May 24, 2024 15:40
@Yuqi-Du
Copy link
Contributor

Yuqi-Du commented May 28, 2024

LGTM

if (!indexingDenyAll()) {
String existKeys =
"CREATE CUSTOM INDEX IF NOT EXISTS %s_exists_keys ON \"%s\".\"%s\" (exist_keys) USING 'StorageAttachedIndex'";
apprender
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment to explain why we are using quoted identifiers, comments like this make it less likely another person will change it later.

I would also consider a helper function or lambda to quote the identifier rather than have lots of \" in a string which can easily become unbalanced.

Comment also for the create table statement.

Example "Using CQL quoted identifiers to preserve the case of the identifiers in the CQL schema, and enforce case sensitive comparisons. This is expected behaviour for the Data API."

@maheshrajamani maheshrajamani merged commit 73b8528 into main May 28, 2024
3 checks passed
@maheshrajamani maheshrajamani deleted the create-collection-mixed-casing-fix branch May 28, 2024 22:38
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.

Index creation needs to be wrapped with quote
3 participants