Skip to content

fix(stream): reset tableScan operator - #33225

Merged
dapan1121 merged 14 commits into
3.0from
enh/TD-37251-tablescan
Oct 21, 2025
Merged

fix(stream): reset tableScan operator#33225
dapan1121 merged 14 commits into
3.0from
enh/TD-37251-tablescan

Conversation

@wangmm0220

Copy link
Copy Markdown
Contributor

Description

Please briefly describe the code changes in this pull request.

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 @wangmm0220, 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 significantly enhances the robustness and correctness of stream processing by implementing comprehensive state reset mechanisms for various scan operators. By introducing specific reset functions for TableScan, TableMergeScan, and SysTableScan operators, it ensures that their internal states are properly cleared and reinitialized when a stream task is reset, preventing issues related to stale data or resource leaks. The changes also include minor improvements to logging and null pointer handling.

Highlights

  • Improved Operator State Reset: Introduced dedicated state reset functions for TableScan, TableMergeScan, and SysTableScan operators, ensuring proper cleanup and reinitialization of operator states when a stream task is reset.
  • Refined Stream Task Reset Logic: The vnodeProcessStreamFetchMsg function now correctly distinguishes between creating a new stream execution task and resetting an existing one, utilizing the new qResetTableScan and operator-specific reset functions.
  • Enhanced Debugging and Logging: Added informative qInfo logging for meta data fetching and loading in system table scans, and adjusted a debug flag for data block printing to a more appropriate level.
  • NULL Pointer Safety: A NULL pointer check was added to the blockDataEmpty function to prevent potential crashes.
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.

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

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.

Code Review

This pull request refactors the stream operator reset logic by introducing a polymorphic resetStateFn function pointer. This is a good design improvement. The implementation is applied to TableScan, TableMergeScan, and SysTableScan operators. My review includes a suggestion to refactor some duplicated code and to remove a large block of commented-out code for better maintainability.

Comment thread source/libs/executor/src/executor.c Outdated
Comment thread source/libs/executor/src/scanoperator.c Outdated
@wangmm0220
wangmm0220 requested a review from a team as a code owner October 13, 2025 03:45
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dapan1121
dapan1121 merged commit fff8f5f into 3.0 Oct 21, 2025
10 of 12 checks passed
happyguoxy added a commit that referenced this pull request Oct 22, 2025
fix(stream): reset tableScan operator (#33225)
@minhuinie
minhuinie deleted the enh/TD-37251-tablescan branch February 4, 2026 02:55
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.

4 participants