Thank you for your interest in contributing to clickhouse-arrow! This document provides guidelines and instructions for contributing to the project.
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or bug fix
- Make your changes
- Run tests and ensure they pass
- Submit a pull request
- Rust 1.70+ (we use the 2024 edition)
- Docker (for running integration tests)
- ClickHouse server (optional for manual testing)
# Build the project
cargo build
# Build with release optimizations
cargo build --release# Run all tests (requires Docker for integration tests)
just test
# Or
cargo test --features test-utils
# Run specific test suites
just test-one e2e_arrow
# Or
cargo test --test e2e_arrow --features test-utils
cargo test --test e2e_native --features test-utils
# Run with output visible
cargo test --features test-utils -- --nocaptureBefore submitting a PR, please ensure:
# Format code
cargo fmt
# Run clippy
cargo clippy --all-features --all-targets
# Run against all features if feature specific work was added
just check-features
# Check for security issues
cargo audit- Follow Rust standard formatting (use
cargo fmt, pedantic linting is used) - Write clear, self-documenting code
- Add documentation comments for public APIs
- Include examples in documentation where appropriate
- Use clear, descriptive commit messages
- Follow conventional commit format when possible:
feat:for new featuresfix:for bug fixesdocs:for documentation changestest:for test additions/changesrefactor:for code refactoringperf:for performance improvements
- Keep PRs focused: One feature or fix per PR
- Write tests: Include tests for new functionality
- Update documentation: Keep docs in sync with code changes
- Add examples: For significant features, add examples
- Benchmark if needed: For performance-critical changes
- Unit tests go inline with modules
- Integration tests use Docker containers (via testcontainers)
- All tests must pass before merging
- Aim for high test coverage (currently at 90%+)
Key components:
- Client Module (
src/client/): Connection management and query execution - Protocol Implementation (
src/native/): ClickHouse wire protocol - Data Formats:
- Entrypoint (
src/formats/): Internal type system - Arrow Format (
src/formats/arrow/,src/arrow/): Arrow RecordBatch integration - Native Format (
src/formats/native/,src/native/): Internal type system
- Entrypoint (
- Type System (
src/native/types/,src/arrow/types/): Comprehensive ClickHouse type support
When reporting issues, please include:
- Rust version (
rustc --version) - ClickHouse server version
- Minimal reproducible example
- Error messages and stack traces
- Expected vs actual behavior
- Open an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Check existing issues before creating new ones
By contributing, you agree that your contributions will be licensed under the MIT License.