Skip to content

Latest commit

 

History

History
134 lines (95 loc) · 5.12 KB

CONTRIBUTING.md

File metadata and controls

134 lines (95 loc) · 5.12 KB

How to contribute to Apache Arrow Go

We utilize Conventional Commits for our commit messages. This helps maintain the semantic versioning of this module.

Please use the following commit types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test.

For PRs with changes entirely within a single sub-package, please use a scope that references that package such as arrow/flight or parquet/pqarrow. For more general PRs, a top level scope should be sufficient.

For example:

fix(arrow/cdata): handle empty structs in C data interface

ci: update CI environment

feat(parquet): support new encoding type

Running the tests

Some tests read shared test data from the arrow-testing and parquet-testing git submodules. Fetch them when you clone:

git clone --recurse-submodules https://github.com/apache/arrow-go.git

or, in an existing clone:

git submodule update --init

Then point the tests at the data and run them from the repository root:

export ARROW_TEST_DATA=$PWD/arrow-testing/data
export PARQUET_TEST_DATA=$PWD/parquet-testing/data
export PARQUET_TEST_BAD_DATA=$PWD/parquet-testing/bad_data
go test ./...

Set these so tests that use the shared data can run. Without the submodules, tests in packages such as arrow/csv, parquet, parquet/file and parquet/pqarrow fail or panic because they cannot find their data files. Some tests instead return early or skip when a variable is unset.

CI runs Arrow tests with -short and the assert,test tags, then adds noasm for a second pass. See ci/scripts/test.sh for the full commands and CGO-specific tags. Some checks require these tags, so include them when reproducing CI failures locally.

Generating Thrift

The generated Go definitions for Parquet Thrift live under parquet/internal/gen-go. If the upstream Parquet Thrift definitions change, or if you are updating code that depends on definitions others have changed, regenerate these files with the Thrift compiler before sending a PR.

Install the thrift compiler locally, then download the current Parquet Thrift definition into the repository root:

curl -L -o parquet.thrift https://raw.githubusercontent.com/apache/parquet-format/master/src/main/thrift/parquet.thrift

Run generation from the repository root:

go generate ./parquet

The downloaded parquet.thrift file is only an input to generation. Do not add it to git; commit the generated Go changes instead.

The generated package is internal on purpose. Public APIs should not expose the whole generated Thrift surface directly. When a generated enum, struct, or constant needs to be used outside the internal package, add or update the small public wrapper, alias, or conversion helper in the relevant parquet package instead. This keeps the exported API controlled while still making conversions to and from the generated Thrift types straightforward.

Did you find a bug?

The Arrow project uses GitHub as a bug tracker. To report a bug, sign in to your GitHub account, navigate to GitHub issues and click on New issue .

To be assigned to an issue, add a comment "take" to that issue.

Before you create a new bug entry, we recommend you first search among existing Arrow issues in GitHub.

Did you write a patch that fixes a bug or brings an improvement?

If there is a corresponding issue for your patch, please make sure to reference the issue in your PR description.

Do you want to propose a significant new feature or an important refactoring?

We ask that all discussions about major changes in the codebase happen publicly on the arrow-dev mailing-list.

Do you have questions about the source code, the build procedure or the development process?

You can also ask on the mailing-list, see above.

Further information

Please read our development documentation or look through the New Contributor's Guide.