Skip to content

refactor: splitting clap::Parser from Config #18389

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

Merged
merged 2 commits into from
Jul 20, 2025

Conversation

forsaken628
Copy link
Collaborator

@forsaken628 forsaken628 commented Jul 18, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

The current Config takes on too many roles and is difficult to understand and maintain, in this PR Cmd is split from Config and dedicated to parsing commands. Also optimized the display of databend-query --help.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Jul 18, 2025
@BohuTANG
Copy link
Member

Hi @forsaken628,

Making config loading easier is great! 👍

Please enhance this summary to clarify the intent behind this change and confirm whether it impacts our existing warehouse loading mechanisms, as we have different config loading approaches across various scenarios and want to avoid breaking changes.

cc @everpcpc to review.

@forsaken628 forsaken628 merged commit 26c007f into databendlabs:main Jul 20, 2025
86 of 87 checks passed
@forsaken628 forsaken628 deleted the cmd branch July 20, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants