Skip to content

[CASSANALYTICS-183] - Pass quoted identifiers to sidecar API calls for mixed-case keyspace/table restore - #226

Open
bianca-stanciu29 wants to merge 6 commits into
apache:trunkfrom
bianca-stanciu29:CASSANALYTICS-183
Open

bianca-stanciu29 wants to merge 6 commits into
apache:trunkfrom
bianca-stanciu29:CASSANALYTICS-183

Conversation

@bianca-stanciu29

Copy link
Copy Markdown

No description provided.

private TokenRangeReplicasResponse getTokenRangesAndReplicaSets()
{
CassandraContext context = getCassandraContext();
String quotedKeyspace = maybeQuotedIdentifier(bridge(), conf.quoteIdentifiers, conf.keyspace);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: change name to maybeQuotedKeyspace?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, renamed the local variable to maybeQuotedKeyspace in CassandraClusterInfo.

}

@Test
void testCreateRestoreJobUsesQuotedIdentifiers() throws Exception

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think about adding quoted identifiers tests to the other modified APIs?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, added tests for quoted identifiers in the direct and coordinated restore-slice requests, coordinated restore-job progress, cluster schema and token-range requests, and dynamic sizing/table-stats calls.

/**
* @return the keyspace name, quoted with double quotes when {@code quoteIdentifiers} is set
*/
public String maybeQuotedKeyspace()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wondering here if we really need wrappers with the "maybe*" prefix, or we can just use this as default for keyspace() and table(). What do you think @yifan-c / @frankgh ?

@bianca-stanciu29 bianca-stanciu29 Oct 2, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@bbotella @yifan-c @frankgh I think we should keep keyspace() and table() as raw-name accessors. They’re also used for SSTable metadata, local data-layer setup, and job statistics, so returning quoted names would require checking those callers too. The separate maybeQuoted accessors let us apply quoting when building Sidecar requests without changing other uses. CASSSIDECAR-475 fixes the metadata lookup inside Sidecar, but that’s separate from what these analytics accessors return. What do you think?

bianca-stanciu29 and others added 2 commits October 2, 2026 10:47
Rename the conditional keyspace value and verify quoted names in restore, coordinated, topology, and sizing requests.
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