Skip to content

Conversation

@brfrn169
Copy link
Collaborator

Description

This PR updates the Cassandra adapter to use CoreError for messages of UnsupportedOperationException.

Related issues and/or PRs

Changes made

  • Updated the Cassandra adapter to use CoreError for messages of UnsupportedOperationException.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@brfrn169 brfrn169 requested a review from Copilot September 19, 2025 04:18
@brfrn169 brfrn169 self-assigned this Sep 19, 2025
Copy link
Contributor

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 PR standardizes error messaging for TIMESTAMP type unsupported operations in the Cassandra adapter by introducing a centralized CoreError enum value and replacing hardcoded error messages.

  • Introduces CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED error constant in CoreError
  • Updates three classes to use the centralized error message instead of hardcoded strings
  • Maintains consistent error formatting with column name parameter

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
CoreError.java Added new error constant for Cassandra TIMESTAMP type unsupported operation
ValueBinder.java Updated to use CoreError for TIMESTAMP column binding exception
ResultInterpreter.java Updated to use CoreError for TIMESTAMP column conversion exception
CassandraAdmin.java Updated to use CoreError for TIMESTAMP column creation and modification exceptions

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @brfrn169, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the error handling within the Cassandra adapter by standardizing the messages for UnsupportedOperationException when dealing with the TIMESTAMP data type. Instead of using ad-hoc string messages, the adapter now leverages a newly defined CoreError constant, CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED. This change enhances the consistency and maintainability of error reporting across the Cassandra integration.

Highlights

  • Standardized Error Messaging: Replaced hardcoded UnsupportedOperationException messages with a new CoreError constant for TIMESTAMP type unsupported operations in the Cassandra adapter.
  • New CoreError Constant: Introduced CASSANDRA_TIMESTAMP_TYPE_NOT_SUPPORTED to centralize the error message for unsupported TIMESTAMP data type in Cassandra.
  • Improved Maintainability: Ensures consistent error reporting and simplifies future updates to error messages related to Cassandra's TIMESTAMP type limitations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 is a good improvement. It refactors the Cassandra adapter to use a centralized CoreError for UnsupportedOperationException when handling the TIMESTAMP data type. This change enhances maintainability and consistency. The new error messages are also more informative as they now include the column name, which is helpful for debugging. The implementation is clean and correct across all modified files.

Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Contributor

@KodaiD KodaiD left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Member

@josh-wong josh-wong left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!🙇🏻‍♂️

@brfrn169 brfrn169 merged commit 98ffa4d into master Sep 23, 2025
156 of 160 checks passed
@brfrn169 brfrn169 deleted the use-CoreError-in-cassandra branch September 23, 2025 13:15
feeblefakie pushed a commit that referenced this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants