-
Notifications
You must be signed in to change notification settings - Fork 5k
fix(stream): fix output table schema check #33772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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.
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
afdc328 to
3aa836b
Compare
3aa836b to
557e599
Compare
There was a problem hiding this 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.
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
test/cases/18-StreamProcessing/02-Stream/test_stream_output_table.py
Outdated
Show resolved
Hide resolved
557e599 to
9201e04
Compare
9201e04 to
42666a7
Compare
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.