Skip to content

merge main#34471

Merged
cadem merged 4 commits into6755488313/add-check-keyfrom
main
Feb 2, 2026
Merged

merge main#34471
cadem merged 4 commits into6755488313/add-check-keyfrom
main

Conversation

@cadem
Copy link
Copy Markdown
Contributor

@cadem cadem commented Feb 2, 2026

Description

Issue(s)

  • Close/close/Fix/fix/Resolve/resolve: Issue Link

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @cadem, 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 refines the system's metadata handling by integrating an ownerId into table metadata responses, which likely enhances data governance and access control. Concurrently, it undertakes a significant refactoring of the scalar subquery test suite, splitting tests into more focused, table-specific files to improve test maintainability and coverage. Minor but important adjustments to privilege tests further bolster the system's security and robustness.

Highlights

  • Metadata Ownership Tracking: The core C functions metaUpdateMetaRsp and metaUpdateVtbMetaRsp have been enhanced to accept and store an ownerId in the STableMetaRsp structure, improving metadata ownership tracking.
  • Scalar Subquery Test Refactoring: Existing Python test files for scalar subqueries (e.g., test_scalar_sub4a.py) have been renamed by appending '1' (e.g., test_scalar_sub4a1.py). Corresponding new test files (e.g., test_scalar_sub4a2.py) have been added, effectively splitting the original tests into more granular, table-specific test cases.
  • Privilege Test Enhancements: The test_priv_basic.py file has been updated to simplify createdb privilege granting using alter user and to include grant use on database and revoke use on database statements in privilege management functions, along with correcting an expected error message and uncommenting a revoke test.
  • CI Configuration Update: The cases.task CI configuration file has been modified to reflect the renamed and newly added scalar subquery test files, marking them for specific handling (currently 'n' for not running by default).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/new-framework-test.yml
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.

@cadem cadem merged commit 9e66c08 into 6755488313/add-check-key Feb 2, 2026
6 checks passed
Copy link
Copy Markdown
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 ownerId to table metadata responses, propagating this information through various metadata update functions. It also includes several updates and fixes to test cases, particularly for scalar subqueries and privileges. A notable test fix is the addition of GRANT USE ON DATABASE when granting table-level privileges, which is a good correction. The test suite for scalar subqueries has also been significantly expanded.

My review found a minor inconsistency in how ownerId is handled for virtual child tables during creation versus alteration, for which I've left a specific comment.

}

code = metaUpdateVtbMetaRsp(pEntry, pEntry->name, NULL, &pEntry->colRef, *ppRsp, TSDB_VIRTUAL_CHILD_TABLE);
code = metaUpdateVtbMetaRsp(pEntry, pEntry->name, NULL, &pEntry->colRef, 0, *ppRsp, TSDB_VIRTUAL_CHILD_TABLE);
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.

medium

There's an inconsistency in handling ownerId for virtual child tables. Here, on creation, ownerId is hardcoded to 0. However, in metaAlterTableColumnRef and metaRemoveTableColumnRef (lines 2010 and 2114), the ownerId for a virtual child table is correctly retrieved from its super table. The ownerId should also be set from the super table during creation to ensure consistency.

  SMetaEntry *pStbEntry = NULL;
  int64_t ownerId = 0;
  if (metaFetchEntryByUid(pMeta, pEntry->ctbEntry.suid, &pStbEntry) == 0) {
    ownerId = pStbEntry->stbEntry.ownerId;
    metaFetchEntryFree(&pStbEntry);
  }
  code = metaUpdateVtbMetaRsp(pEntry, pEntry->name, NULL, &pEntry->colRef, ownerId, *ppRsp, TSDB_VIRTUAL_CHILD_TABLE);

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.

5 participants