Skip to content

Conversation

@JinqingKuang
Copy link
Contributor

Description

Please briefly describe the code changes in this pull request.

Jira: https://jira.taosdata.com:18080/browse/TS-7721

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
Contributor

Summary of Changes

Hello @JinqingKuang, 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 addresses and fixes an issue related to the validation of stream output table schemas. It refines the parsing and validation logic for stream definitions, particularly concerning how tag names are handled and how schema mismatches are identified. A new, comprehensive test suite has been introduced to ensure the robustness and correctness of these schema checks, alongside a minor enhancement to logging for stream processing.

Highlights

  • Improved Stream Output Table Schema Validation: The logic for checking stream output table schemas has been refined to provide more granular error handling, specifically separating type and name mismatch checks for tags.
  • Enhanced Tag Name Parsing: The parser now correctly handles quoted tag names by dequoting them and ensuring proper null termination during Abstract Syntax Tree (AST) creation.
  • Comprehensive Test Coverage for Stream Output Table Schema: A new, extensive test suite has been added to thoroughly validate various scenarios of valid and invalid output table schemas, covering both column and tag type/name mismatches.
  • Enhanced Logging for Stream Processing: More detailed logging has been added to vnodeProcessStreamTsdbMetaReq to include version, start/end keys, and group ID for improved debugging and traceability.
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 effectively addresses the issue of vague error messages during stream output table schema checks. By separating the validation for tag type and tag name, it provides more precise feedback to the user. The handling of quoted tag names is also a good addition. The new test suite is comprehensive and validates the fix thoroughly. I have one suggestion to refactor the new test code to improve its maintainability by reducing duplication.

Copilot AI review requested due to automatic review settings December 5, 2025 07:23
Copilot finished reviewing on behalf of JinqingKuang December 5, 2025 07:26
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 fixes the output table schema validation for stream processing operations. The key improvement is separating the validation of tag types and tag names to provide more specific error messages when schema mismatches occur.

  • Separates tag type and tag name validation checks to provide clearer error messages
  • Adds tag name dequoting logic to properly handle quoted tag names in schema comparisons
  • Refactors user recalc request handling with improved thread safety
  • Adds comprehensive test coverage for output table schema validation scenarios

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/ci/cases.task Registers new test case in CI pipeline
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py Adds comprehensive test for stream output table schema validation including type and name mismatches
source/libs/parser/src/parTranslater.c Separates tag type and tag name validation to provide more specific error messages
source/libs/parser/src/parAstCreater.c Adds tag name dequoting logic to properly handle quoted identifiers and formatting cleanup
source/libs/new-stream/inc/streamTriggerTask.h Adds fields for user recalc request management with proper locking
source/libs/new-stream/src/streamTriggerTask.c Refactors user recalc request handling for better thread safety and adds boundary check for history context
source/dnode/vnode/src/vnd/vnodeStream.c Enhances logging with additional request parameters for debugging

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

2 participants