Skip to content

test: tidy up cases on main branch #33317

Merged
guanshengliang merged 14 commits intomainfrom
case/TD-38265-MAIN
Oct 21, 2025
Merged

test: tidy up cases on main branch #33317
guanshengliang merged 14 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 a review from a team as a code owner October 20, 2025 09:50
@DuanKuanJun DuanKuanJun changed the title Tiny up cases on main branch Tidy up cases on main branch Oct 20, 2025
@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 significant overhaul of the test suite, primarily by refactoring and expanding existing test cases for core SQL functionalities. The changes aim to improve test coverage and robustness for ALTER DATABASE options and various scalar functions like CAST and CONCAT. It also includes a substantial cleanup effort by removing outdated test files and updating documentation, streamlining the test framework for better maintainability.

Highlights

  • Test Case Refactoring and Consolidation: Multiple test files related to CAST and CONCAT functions, as well as ALTER DATABASE options, have been refactored and consolidated into existing or newly named test modules. This includes migrating tests from uncatalog/army and uncatalog/system-test directories.
  • Expanded ALTER DATABASE Option Tests: The test_db_alter_option.py file now includes comprehensive new test cases for various ALTER DATABASE options, such as buffer, cache model, cache size, min rows, pages, WAL level, WAL fsync period, STT trigger, WAL retention, SS keep local, SS compact, keep time offset, and compact interval/time offset, along with checks for unsupported options.
  • Enhanced CAST Function Tests: The test_fun_sca_cast.py module has been significantly expanded to cover a wider range of CAST operations, including conversions between various data types (int, bigint, smallint, tinyint, float, string, boolean, timestamp) and handling of null values and computed expressions. It also incorporates a test for JIRA TS-5972.
  • Improved CONCAT Function Tests: The test_fun_sca_concat.py module now includes additional test cases for the CONCAT function, specifically addressing scenarios involving Chinese characters, ensuring proper handling of multi-byte strings.
  • Large Parameter Count Function Tests: The test_fun_select_last_row.py module has been updated to include tests for last_row and first functions with a large number of parameters (up to 520), verifying their behavior under such conditions.
  • Test File Cleanup and Renaming: Several redundant or old test files have been removed, and some existing test files have been renamed (e.g., test_selectlist_basic.py to test_query_select_basic.py, test_concat2.py to test_fun_sca_concat2.py) to better align with the project's test case organization and naming conventions. Associated cases.task and mkdocs.yml entries have been updated accordingly.
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 primarily involves refactoring and tidying up test cases, which is a positive step for maintainability. However, I've identified several areas for improvement. The most critical issues are tests lacking assertions, which undermines their effectiveness. There are also instances of using print instead of the project's logger, and some code quality issues like duplicate imports and redundant statements. Addressing these points will significantly improve the quality and reliability of the test suite.

@guanshengliang guanshengliang merged commit b0f8179 into main Oct 21, 2025
5 checks passed
@guanshengliang guanshengliang changed the title Tidy up cases on main branch test: tidy up cases on main branch Oct 21, 2025
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