Skip to content

feat: support rows_per_table=0 to allow subtables with zero rows#77

Open
YamingPei wants to merge 7 commits into
mainfrom
feat/7004021441
Open

feat: support rows_per_table=0 to allow subtables with zero rows#77
YamingPei wants to merge 7 commits into
mainfrom
feat/7004021441

Conversation

@YamingPei

Copy link
Copy Markdown
Contributor

Description

Support rows_per_table=0 to allow subtables with zero rows.

Issue(s)

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 May 30, 2026 07:10

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

Copy link
Copy Markdown

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 updates the configuration parser to allow rows_per_table to be set to 0 (previously it had to be positive or -1) and adds corresponding unit tests. The reviewer suggests automatically disabling the data cache when rows_per_table is set to 0 to prevent potential division-by-zero errors or undefined behavior in the caching logic, and recommends adding a test assertion to verify this automatic disabling.

Comment thread src/parameter/inc/ConfigParser.hpp
Comment thread src/parameter/test/TestConfigParser.cpp

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands GenerationConfig YAML parsing to accept rows_per_table: 0, enabling subtables to be created without any rows inserted. Previously only positive values or -1 (unlimited) were allowed.

Changes:

  • Relax validation in ConfigParser so rows_per_table == 0 is accepted; update the error message accordingly.
  • Add three parser tests covering rows_per_table values 0, -1, and -2 (invalid).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/parameter/inc/ConfigParser.hpp Changes val <= 0 check to val < 0 and updates the error message to "non-negative or -1".
src/parameter/test/TestConfigParser.cpp Adds and registers tests for zero, unlimited, and invalid negative rows_per_table values.

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

Comment thread src/parameter/inc/ConfigParser.hpp
@codecov-commenter

codecov-commenter commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.11%. Comparing base (7be55bb) to head (a83eae8).

Files with missing lines Patch % Lines
...ons/components/connector/src/TDengineConnector.cpp 0.00% 2 Missing ⚠️
src/actions/core/insert/src/InsertDataAction.cpp 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   86.15%   86.11%   -0.04%     
==========================================
  Files         214      214              
  Lines       11257    11262       +5     
  Branches     4913     4804     -109     
==========================================
  Hits         9698     9698              
- Misses       1559     1564       +5     
Flag Coverage Δ
Linux-arm64 84.26% <55.55%> (-0.05%) ⬇️
Linux-x64 83.99% <55.55%> (+0.05%) ⬆️
macOS-arm64 85.92% <55.55%> (-0.01%) ⬇️
macOS-x64 85.55% <55.55%> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings May 30, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants