Skip to content

fix: [6587137697] Forbid query ins_virtual_child_columns.#34567

Open
Simon9997 wants to merge 1 commit intomainfrom
fix/main/6587137697
Open

fix: [6587137697] Forbid query ins_virtual_child_columns.#34567
Simon9997 wants to merge 1 commit intomainfrom
fix/main/6587137697

Conversation

@Simon9997
Copy link
Contributor

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?

Copilot AI review requested due to automatic review settings February 13, 2026 01:08
@Simon9997 Simon9997 requested review from a team, dapan1121 and hzcheng as code owners February 13, 2026 01:08
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Simon9997, 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 enhances system stability and security by preventing direct user queries to a specific internal system table, ins_virtual_child_columns. The change ensures that this table, which is not intended for direct user interaction, cannot be accessed, thereby maintaining data integrity and system behavior. Corresponding test cases have been adjusted to reflect and validate this new restriction.

Highlights

  • System Table Access Restriction: Direct queries to the internal information_schema.ins_virtual_child_columns system table are now explicitly forbidden to prevent unintended access or potential issues.
  • Test Case Updates: Existing test cases have been updated to remove references to the now-forbidden table, and new tests have been added to verify that attempts to query ins_virtual_child_columns correctly result in an error.

🧠 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.

Changelog
  • source/libs/parser/src/parTranslater.c
    • Implemented a check within translateRealTable to explicitly disallow queries against TSDB_INS_TABLE_VC_COLS.
    • Configured the system to return TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED error when such a query is attempted.
  • test/cases/18-StreamProcessing/99-Others/random_stream.py
    • Removed information_schema.ins_virtual_child_columns from the system_tables list in the __init__ method of RandomStream.
    • Corrected a missing newline character at the end of the file.
  • test/cases/21-MetaData/test_meta_information_schema.py
    • Added a new method ins_virtual_child_columns_check to test for the forbidden query.
    • Integrated the ins_virtual_child_columns_check into the do_information_schema execution flow.
  • test/cases/uncatalog/system-test/0-others/test_information_schema.py
    • Created ins_virtual_child_columns_check function to assert error on querying the forbidden table.
    • Invoked ins_virtual_child_columns_check within test_information_schema to ensure the new restriction is tested.
Activity
  • No specific activity (comments, reviews, etc.) has been recorded for this pull request yet.
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 correctly forbids direct queries to the ins_virtual_child_columns system table. The change in parTranslater.c is straightforward and effectively implements the restriction. The test suite has been updated accordingly: random_stream.py is modified to exclude this table from random testing, and new test cases have been added in test_meta_information_schema.py and test_information_schema.py to verify that queries to this table now fail with the expected error. The changes are of high quality and I have no further suggestions.

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 forbids querying information_schema.ins_virtual_child_columns and adds regression tests to assert the query is rejected.

Changes:

  • Add parser-side rejection for the ins_virtual_child_columns system table.
  • Add system tests validating the rejection error.
  • Remove ins_virtual_child_columns from the random stream system-table query pool.

Reviewed changes

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

File Description
test/cases/uncatalog/system-test/0-others/test_information_schema.py Adds a test that querying ins_virtual_child_columns fails with an expected error message.
test/cases/21-MetaData/test_meta_information_schema.py Adds the same rejection test to the metadata information schema suite.
test/cases/18-StreamProcessing/99-Others/random_stream.py Removes ins_virtual_child_columns from the set of tables used for randomized querying.
source/libs/parser/src/parTranslater.c Adds a translator check to reject TSDB_INS_TABLE_VC_COLS as a system table query.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant