Contributing¶
We welcome contributions to Apache Iceberg C++. For general Iceberg contribution guidelines, see the official guide. Contributors using AI-assisted tools must follow the AI-assisted contribution guidelines.
For build and installation instructions, see Getting Started.
Coding Standard¶
The project follows the same coding standard as Apache Arrow (a variant of the Google’s C++ Style Guide)
Naming Conventions¶
| Element | Style | Examples |
|---|---|---|
| Classes / Structs | PascalCase |
TableScanBuilder, PartitionSpec |
| Factory methods | PascalCase |
CreateNamespace(), ExtractYear() |
| Accessors / Getters | snake_case |
name(), type_id(), partition_spec() |
| Variables | snake_case |
file_io, schema_id |
| Constants | k + PascalCase |
kHeaderContentType, kMaxPrecision |
General Practices¶
- Prefer smart pointers (
std::unique_ptr,std::shared_ptr) for memory management - Use
Result<T>for error propagation - Write Doxygen-style comments (
/// \brief ...) for all public APIs - Do not remove public methods without a deprecation cycle:
Development Environment¶
Code Formatting¶
Formatting is enforced via .clang-format (Google base, ColumnLimit: 90). Set up pre-commit to run it automatically:
To run all hooks manually on the entire codebase:
Public Header Compatibility¶
Public headers must compile as C++20; the library itself builds as C++23. After adding, moving, or removing a public header, regenerate the public-header list:
The script updates src/iceberg/cpp20_compatibility_internal.h and exits nonzero,
so include the generated change and rerun pre-commit. The
generate-public-headers hook performs the same step automatically. When adding a
module or install directory, also update the component mapping in
ci/scripts/generate_public_headers.py.
Dev Containers¶
We provide Dev Container templates for VS Code:
Then select Dev Containers: Reopen in Container from the Command Palette.
Submitting Changes¶
Workflow¶
- Fork the repository on GitHub
- Create a feature branch from
main: - Make your changes following the coding standards
- Add or update tests for any behavioral changes
- Ensure all tests pass and
pre-commit run -ais clean - Push to your fork and open a Pull Request
Open Pull Request Limit¶
To keep the review queue manageable, contributors without write access to
apache/iceberg-cpp can have up to three open, non-draft pull requests at a
time. If you reach the limit, wait for a PR to merge, close one you no longer
plan to pursue, or move one back to draft if it is not ready for review.
Running module tests¶
On pull requests, the AWS, Hive, and SQL Catalog suites run automatically
when files in their module directories change. For AWS this covers S3 and
SigV4. Changes limited to CMake files, templates, documentation, shared tests,
scripts, or workflows skip these suites. Every push to main or to a tag runs
all three suites.
To request a suite for any open pull request, a contributor with write access can post the corresponding command as a separate PR comment.
| Comment | Test suite |
|---|---|
/ci aws |
AWS S3 and SigV4 |
/ci hive |
Hive Catalog |
/ci sql |
SQL Catalog |
The command uses the workflow definition from the default branch to test the PR head commit. It posts the result, commit SHA, and run link on the PR. To test a later commit, post the command again.
Commit Messages¶
Follow Conventional Commits:
feat: add support for S3 file system
fix: resolve memory leak in table reader
docs: update API documentation
test: add unit tests for schema validation
refactor(rest): simplify auth token handling
Pull Request Checklist¶
- Clear problem/solution description
- Linked issue(s) when applicable
- Tests for behavioral changes
- Passing CI checks (tests, pre-commit, license header, sanitizers)
Getting Help¶
- GitHub Issues — Report bugs or request features
- Good First Issues — Browse here
- Mailing List — dev@iceberg.apache.org (subscribe / unsubscribe / archives)
- Slack — #cpp channel
The Apache Iceberg community follows the Apache Way and the Apache Foundation Code of Conduct.