Skip to content

tidy up CI case for link function#33253

Merged
guanshengliang merged 29 commits intomainfrom
case/TD-38265-MAIN
Oct 20, 2025
Merged

tidy up CI case for link function#33253
guanshengliang merged 29 commits intomainfrom
case/TD-38265-MAIN

Conversation

@DuanKuanJun
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?

@DuanKuanJun DuanKuanJun requested review from a team and feici02 as code owners October 14, 2025 11:21
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @DuanKuanJun, 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 focuses on a comprehensive cleanup and reorganization of CI test cases, particularly those related to functions. It introduces a new mechanism for parsing docstring labels to control test execution, standardizes docstring formats across a wide range of function tests, and restructures test file paths for better organization. Additionally, new dedicated test cases have been added for several scalar functions, enhancing test coverage and clarity.

Highlights

  • Test Case Reorganization: Numerous test files under 'test/cases/10-DataIngestion/' have been moved into a new '01-SQL' subdirectory, indicating a restructuring of data ingestion test cases.
  • Docstring Standardization: Docstrings across many test files, especially for scalar, aggregate, and timeseries functions, have been updated to follow a consistent 'Fun: FunctionName()' format. This includes updates for functions like ABS(), ACOS(), AVG(), COUNT(), ELAPSED(), HISTOGRAM(), HYPERLOGLOG(), LEASTSQUARES(), PERCENTILE(), SPREAD(), STDDEV(), SUM(), BOTTOM(), COLS(), FIRST(), LAST(), LAST_ROW(), MAX(), MIN(), MODE(), TAIL(), TOP(), UNIQUE(), CSUM(), DIFF(), INTERP(), IRATE(), MAVG(), SAMPLE(), STATECOUNT(), STATEDURATION(), and TWA().
  • New Test Case Definitions: The 'test_scalar_all.py' file has been refactored to introduce dedicated test methods for various scalar functions (e.g., Degrees, Exp, Greatest, Least, Ln, Mod, Pi, Radians, Rand, Sign, Truncate, Crc32, Base64, Ascii, Char, Char_length), each with comprehensive docstrings detailing their test coverage. A new test for the 'Corr()' function was also added in 'test_tdgpt.py', and a 'Find_in_set()' test in 'test_scalar_string.py'.
  • New Derivative Function Test: A new test file 'test_fun_ts_derivative.py' has been added to cover the 'Derivative()' timeseries function, including various test scenarios and data types.
  • CI Script Enhancement: The 'generate_case_md.py' script now includes logic to parse 'Labels' from docstrings and can conditionally skip processing test cases marked with an 'ignore' label, providing more granular control over CI execution.
  • Test Resource Cleanup: Numerous test resource files ('.csv', '.err', '.in') previously located under 'test/cases/uncatalog/army/query/function/' have been removed, with some being relocated and renamed to 'test/cases/22-Functions/resource/', streamlining the test asset management.
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
Copy Markdown
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 tidies up test cases, primarily for CI and documentation generation. It introduces a script to handle special 'ignore' labels in docstrings, reorganizes many test files, and refactors a large test function into smaller methods. My review focuses on a bug in the markdown generation script, an incomplete refactoring, an empty placeholder test, and several areas for improvement in a new test file, including a bug in test assertions and some style issues. While the reorganization is a positive step, some parts require further attention to ensure correctness and maintainability.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.22%. Comparing base (3d38933) to head (b32e3a3).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #33253      +/-   ##
==========================================
- Coverage   54.05%   50.22%   -3.84%     
==========================================
  Files         472      437      -35     
  Lines      294900   268959   -25941     
  Branches    99139    94802    -4337     
==========================================
- Hits       159397   135073   -24324     
- Misses      83784    84764     +980     
+ Partials    51719    49122    -2597     
Flag Coverage Δ
TDengine 50.22% <ø> (-3.83%) ⬇️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ DuanKuanJun
❌ minhuinie
You have signed the CLA already but the status is still pending? Let us recheck it.

@guanshengliang guanshengliang merged commit bf28378 into main Oct 20, 2025
9 of 11 checks passed
@DuanKuanJun DuanKuanJun deleted the case/TD-38265-MAIN branch October 20, 2025 06:14
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