Skip to content

Conversation

@feeblefakie
Copy link
Contributor

This is an automated backport of the following:

Please merge this PR after all checks have passed.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @feeblefakie, 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 backported pull request enhances the handling of IS_NULL conditions on right source table columns within LEFT_OUTER virtual tables in the JDBC storage layer. It introduces a more robust and explicit approach to prevent ambiguous data modifications. Specifically, Put operations with all IS_NULL conditions on the right side will now default to PutIfNotExists, while Delete operations with similar conditions will be disallowed by default to avoid unintended data loss, with both behaviors being configurable through new operation attributes.

Highlights

  • Refined LEFT_OUTER Join Handling: Implemented specific logic for Put and Delete operations on LEFT_OUTER virtual tables when IS_NULL conditions are applied to right source table columns to prevent ambiguous behavior.
  • Put Operation Conversion: For Put operations, if all conditions on right-side columns are IS_NULL in a LEFT_OUTER join, the condition is now converted to PutIfNotExists by default. This behavior is controllable via a new operation attribute.
  • Delete Operation Restriction: For Delete operations, if all conditions on right-side columns are IS_NULL in a LEFT_OUTER join, an IllegalArgumentException is thrown by default to prevent ambiguous deletions. This restriction can be overridden via a new operation attribute.
  • New Error Code: Introduced a new error code, DELETE_IF_IS_NULL_FOR_RIGHT_SOURCE_TABLE_NOT_ALLOWED_FOR_LEFT_OUTER_VIRTUAL_TABLES, to clearly indicate the reason for disallowed delete operations.
  • Operation Attributes Utility: Added a new utility class, JdbcOperationAttributes, to manage and configure these new behaviors for Put and Delete operations related to LEFT_OUTER virtual tables.
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
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 refactors the handling of IS NULL conditions on columns from the right source table in LEFT_OUTER virtual tables. For Put operations, it now converts a PutIf with only IS NULL conditions on right-table columns to a PutIfNotExists by default. This is a sensible default to check for the non-existence of the right-side record. For Delete operations, it now disallows DeleteIf with only IS NULL conditions on right-table columns by default, due to semantic ambiguity. Both behaviors are made configurable through new operation attributes, which is a flexible approach. The changes are well-implemented and include comprehensive tests. My feedback includes a suggestion to improve the robustness of a new private helper method for better maintainability.

@brfrn169 brfrn169 merged commit 900b873 into 3 Nov 25, 2025
72 of 73 checks passed
@brfrn169 brfrn169 deleted the 3-pull-3217 branch November 25, 2025 07:53
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