Your First PR for Databend
Did You Know? To show our appreciation, your GitHub username will be added to the table system.contributors
after your code is successfully merged.
Check it out:
SELECT * FROM system.contributors
Prerequisitesβ
Databend is written in Rust, to build Databend from scratch you will need to install the following tools:
- Git
- Rust Install with Open in the new tab
Coding Guidelinesβ
Code Format and Analysisβ
$ make lint
Code Documentationβ
Any public fields, functions, and methods should be documented with
Please follow the conventions as detailed below for modules
, structs
, enums
, and functions
. The single line is used as a preview when navigating Rustdoc. As an example, see the 'Structs' and 'Enums' sections in the
/// [Single line] One line summary description
///
/// [Longer description] Multiple lines, inline code
/// examples, invariants, purpose, usage, etc.
[Attributes] If attributes exist, add after Rustdoc
Example below:
/// Represents (x, y) of a 2-dimensional grid
///
/// A line is defined by 2 instances.
/// A plane is defined by 3 instances.
#[repr(C)]
struct Point {
x: i32,
y: i32,
}
Contributing Documentationβ
We welcome you to contribute to the Databend documentation, alongside your code! The Databend documentation is composed of markdown files, which makes it easy to write and maintain. To ensure high-quality documentation, we recommend using
When submitting a document for a new command or function, it is crucial to adhere to the provided templates and guidelines to maintain consistency and ensure clarity in the Databend documentation. These templates are designed to include all the necessary information and formatting conventions, making it easier for users to understand and use the commands or functions.
- Open in the new tab
- Open in the new tab
In addition to following the templates, please pay attention to the code included within them. The code serves the purpose of explicitly indicating whether the new command or function is exclusively available for Databend Enterprise and provides information about when the command or function was introduced. This contextual information is crucial for users as it allows them to accurately assess the scope and limitations of the feature. It also enables users to identify the specific versions of Databend that support the feature, enabling them to plan their usage effectively.
Pull Requestsβ
Submit a PRβ
- Fork the
databend
repo and create your branch frommain
. - Open a regular for binding the pull request.Open in the new tab
- Submit a , tag your work in progress.Open in the new tab
- If you have added code that should be tested, add unit tests.
- Verify and ensure that the test suites passes,
make test
. - Make sure your code passes both linters,
make lint
. - Change the status to βReady for reviewβ.
- Watch out the replies from the
@mergify
, she will be your guide.
PR Titleβ
Format: <type>(<scope>): <subject>
<scope>
is optional
fix(query): fix group by string bug
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: rfc, feat, fix, refactor, ci, docs, chore
More types:
rfc
: this PR proposes a new RFCfeat
: this PR introduces a new feature to the codebasefix
: this PR patches a bug in codebaserefactor
: this PR changes the code base without new features or bugfixci
: this PR changes build/ci stepsdocs
: this PR changes the documents or websiteschore
: this PR only has small changes that no need to record, like coding styles.
PR Templateβ
Databend has a
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
## Summary
Summary about this PR
Fixes #issue
You should not change the PR template context, but need to finish:
Summary
- Describes what constitutes the Pull Request and what changes you have made to the code. For example, fixes which issue.
Testingβ
Unit tests
$ make unit-test
Stateless tests
$ make stateless-test
Issuesβ
Databend uses
Documentationβ
All developer documentation is published on the Databend developer site,
Code of Conductβ
Please refer to the Code of Conduct, which describes the expectations for interactions within the community.