Skip to content

Conversation

feeblefakie
Copy link
Contributor

This is an automated request for a manual backport of the following:

  1. Resolve any conflicts that occur during the cherry-picking process.
git fetch origin &&
git checkout 3-pull-3021 &&
git cherry-pick --no-rerere-autoupdate -m1 bb3de17a2fffc9c495716071e0780cf16f4ac2cc
  1. Push the changes.
  2. Merge this PR after all checks have passed.

Thank you!

@KodaiD
Copy link
Contributor

KodaiD commented Sep 25, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the renameTable functionality to the Admin API. The implementation is provided for JDBC-based storages, while for Cassandra, Cosmos DB, and DynamoDB, it correctly throws UnsupportedOperationException as they do not support table renaming. The changes are well-spread across the codebase, including interface definitions, common admin logic, specific storage implementations, and transaction admin decorators. Integration tests have been added to cover the new functionality, including permission checks and scenarios with indexes.

My review focuses on ensuring consistency and correctness. I have one suggestion in JdbcAdmin.java to use the newly added CoreError enum for exception messages to maintain consistency with the rest of the codebase. Overall, the changes are solid and well-tested.

@KodaiD KodaiD marked this pull request as ready for review September 25, 2025 09:31
@KodaiD KodaiD requested a review from Copilot September 25, 2025 09:31
Copy link
Contributor

@Copilot 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 is a backport PR that adds rename table functionality to the ScalarDB Admin API. The changes introduce a new renameTable method to the Admin interface and implement it across all storage adapters and transaction managers.

  • Added renameTable method to the Admin interface and all implementing classes
  • Implemented table renaming for JDBC-based storage adapters with database-specific SQL generation
  • Added comprehensive test coverage for the new functionality across all storage types
  • Properly handled unsupported operations for non-JDBC storage types (Cassandra, Cosmos DB, DynamoDB)

Reviewed Changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
core/src/main/java/com/scalar/db/api/Admin.java Added renameTable method to the core Admin interface
core/src/main/java/com/scalar/db/storage/jdbc/* Implemented JDBC-specific table renaming with database engine strategies
core/src/main/java/com/scalar/db/storage/cassandra/CassandraAdmin.java Added unsupported operation implementation for Cassandra
core/src/main/java/com/scalar/db/storage/cosmos/CosmosAdmin.java Added unsupported operation implementation for Cosmos DB
core/src/main/java/com/scalar/db/storage/dynamo/DynamoAdmin.java Added unsupported operation implementation for DynamoDB
core/src/main/java/com/scalar/db/transaction/* Added renameTable delegation in transaction admin classes
integration-test/src/main/java/* Added comprehensive integration tests for table renaming functionality
core/src/test/java/* Added unit tests covering all storage adapters and transaction managers
core/src/integration-test/java/* Disabled unsupported operations tests for non-JDBC storage types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KodaiD KodaiD merged commit 74879fd into 3 Sep 26, 2025
106 of 108 checks passed
@KodaiD KodaiD deleted the 3-pull-3021 branch September 26, 2025 02:06
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