Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .devcontainer/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
# scl enable devtoolset-11 rh-python38 -- bash # activate modern gcc + python
# source /opt/paimon-env.sh # PATH for rust, cmake
# cd /workspaces/paimon-cpp
# git lfs install --local && git lfs pull # critical: boost & friends are LFS
#
# Run ./.devcontainer/centos7/run.sh smoke from the host for the full check.

Expand Down Expand Up @@ -91,7 +90,7 @@ enabled=0\n' > /etc/yum.repos.d/CentOS-Base.repo \
&& yum makecache

# ---------- Base toolchain ----------
# EPEL provides git-lfs, ninja-build, a newer python3 than the base 3.6.
# EPEL provides ninja-build and a newer python3 than the base 3.6.
# SCL (Software Collections) provides devtoolset-11 (gcc 11) and rh-python38
# without overriding the system gcc/python. CentOS 7's default gcc 4.8 is
# too old for C++17/20 used by lucene++ and our tantivy wrapper.
Expand Down Expand Up @@ -129,7 +128,6 @@ enabled=1\n' > /etc/yum.repos.d/CentOS-SCLo-scl.repo \
rh-python38 \
rh-python38-python-pip \
git \
git-lfs \
ninja-build \
make \
patch \
Expand Down
2 changes: 0 additions & 2 deletions .devcontainer/centos7/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ case "${cmd}" in
"${CONTAINER}" bash -lc '
set -eux
cd /workspaces/paimon-cpp
git lfs install --local
git lfs pull
cmake -S . -B build-centos7 \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
10 changes: 0 additions & 10 deletions .gitattributes

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/gcc8_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-8 g++-8 ninja-build git git-lfs tar curl libcurl4-openssl-dev libssl-dev tzdata zip unzip pkg-config build-essential python3-dev gdb sudo
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-8 g++-8 ninja-build git tar curl libcurl4-openssl-dev libssl-dev tzdata zip unzip pkg-config build-essential python3-dev gdb sudo
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz
tar -zxvf cmake-3.28.3-linux-x86_64.tar.gz -C /usr/local --strip-components=1
rm cmake-3.28.3-linux-x86_64.tar.gz
Expand All @@ -57,8 +57,6 @@ jobs:
ls -la
- name: Checkout paimon-cpp
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
lfs: true
- name: Setup ccache
uses: ./.github/actions/setup-ccache
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
build
build-*/
output
release

# IDE settings
.idea
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Before submitting, please verify:
- **C++17** compatible compiler (GCC recommended)
- **CMake** ≥ 3.16
- **Python 3** (for linting scripts and pre-commit)
- **git-lfs** (the repository uses Git LFS for large files)

---

Expand Down
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ This product includes code from Apache Iceberg C++.
* Dev Container utilities:
* .devcontainer/Dockerfile.template
* .devcontainer/devcontainer.json.template
* .devcontainer/x86_64/devcontainer.json.template
* CI utilities:
* .pre-commit-config.yaml
* Avro direct decoder/encoder:
Expand All @@ -234,6 +235,28 @@ License: https://www.apache.org/licenses/LICENSE-2.0

--------------------------------------------------------------------------------

This product includes code based on Apache Spark.

* Variant utilities:
* src/paimon/common/data/variant/generic_variant.cpp
* src/paimon/common/data/variant/generic_variant.h
* src/paimon/common/data/variant/variant_binary_util.cpp
* src/paimon/common/data/variant/variant_binary_util.h
* src/paimon/common/data/variant/variant_builder.cpp
* src/paimon/common/data/variant/variant_builder.h
* src/paimon/common/data/variant/variant_reassembler.cpp
* src/paimon/common/data/variant/variant_reassembler.h
* src/paimon/common/data/variant/variant_schema.h
* src/paimon/common/data/variant/variant_shredding_utils.cpp
* src/paimon/common/data/variant/variant_shredding_writer.cpp
* src/paimon/common/data/variant/variant_shredding_writer.h

Copyright: 2014 and onwards The Apache Software Foundation.
Home page: https://spark.apache.org/
License: https://www.apache.org/licenses/LICENSE-2.0

--------------------------------------------------------------------------------

This product includes code based on Google Guava.

* Preconditions utility in src/paimon/common/utils/preconditions.h
Expand Down
5 changes: 5 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Copyright 2024-2025 The Apache Software Foundation

--------------------------------------------------------------------------------

Apache Spark
Copyright 2014 and onwards The Apache Software Foundation.

--------------------------------------------------------------------------------

Apache ORC
Copyright 2013 and onwards The Apache Software Foundation.

Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,9 @@ The reading is divided into two stages:

### Clone the Repository

If you don't have `git-lfs` installed, please install it first.

```
$ git clone https://github.com/alibaba/paimon-cpp.git
$ cd paimon-cpp
$ git lfs pull
```bash
git clone https://github.com/alibaba/paimon-cpp.git
cd paimon-cpp
```

### CMake
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
"name": "0.10.0 (dev)",
"version": "dev/",
"url": "#"
"url": "https://alibaba.github.io/paimon-cpp/"
}
]
4 changes: 0 additions & 4 deletions docs/source/api/file_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ Interface
:members:
:undoc-members:

.. doxygenclass:: paimon::BatchReader
:members:
:undoc-members:

.. doxygenclass:: paimon::FileBatchReader
:members:
:undoc-members:
Expand Down
10 changes: 2 additions & 8 deletions docs/source/basic_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ the corresponding snapshot.

Data Files
---------------------------
Data files are grouped by partitions. Currently, Paimon supports using parquet
(default) and orc as data file formats.

.. note::
avro write as a data file format is not supported yet.
Data files are grouped by partitions. Paimon C++ supports Parquet (default),
ORC, and Avro as data file formats.

Partition
---------------------------
Expand All @@ -84,6 +81,3 @@ For any two writers modifying a table at the same time, as long as they do not
modify the same partition, their commits can occur in parallel. If they modify
the same partition, only snapshot isolation is guaranteed. That is, the final
table state may be a mix of the two commits, but no changes are lost.

.. note::
Paimon C++ currently does not support compaction.
53 changes: 37 additions & 16 deletions docs/source/build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ as in-memory data format interface. Please ensure that Arrow C++ is installed
and available to your build system

The recommended way to integrate the Paimon C++ libraries into your C++ project
is to use CMake’s `find_package <https://cmake.org/cmake/help/latest/command/find_package.html>`_
is to use CMake's `find_package <https://cmake.org/cmake/help/latest/command/find_package.html>`_
function to locate and integrate dependencies.

CMake
Expand All @@ -45,11 +45,27 @@ for data format and file system.

project(MyExample)

find_package(Arrow REQUIRED)
find_package(Paimon REQUIRED)
# Arrow's static package may export LZ4 under a different target name.
find_package(lz4 CONFIG QUIET)
if(TARGET LZ4::lz4_static AND NOT TARGET LZ4::lz4)
add_library(LZ4::lz4 ALIAS LZ4::lz4_static)
elseif(TARGET lz4::lz4 AND NOT TARGET LZ4::lz4)
add_library(LZ4::lz4 ALIAS lz4::lz4)
endif()

find_package(Arrow CONFIG REQUIRED)
find_package(Paimon CONFIG REQUIRED)

if(TARGET Arrow::arrow_shared)
set(PAIMON_ARROW_TARGET Arrow::arrow_shared)
elseif(TARGET Arrow::arrow_static)
set(PAIMON_ARROW_TARGET Arrow::arrow_static)
else()
message(FATAL_ERROR "No supported Arrow CMake target is available")
endif()

add_executable(my_example my_example.cc)
target_link_libraries(my_example PRIVATE Arrow::arrow_shared
target_link_libraries(my_example PRIVATE ${PAIMON_ARROW_TARGET}
Paimon::paimon_shared
Paimon::paimon_parquet_file_format_shared
Paimon::paimon_local_file_system_shared)
Expand All @@ -61,12 +77,15 @@ The directive ``find_package(Paimon REQUIRED)`` instructs CMake to locate a
Paimon C++ installation on your system. If successful, it sets ``Paimon_FOUND``
to true if the Paimon C++ libraries were found.

It also defines the following linkable imported targets:
It defines the following supported imported target:

* ``Paimon::paimon_shared`` links to the Paimon shared libraries
* ``Paimon::paimon_static`` links to the Paimon static libraries

In most cases, it is recommended to use the Paimon shared libraries.
Static targets such as ``Paimon::paimon_static`` may also be present when
Paimon is built with ``PAIMON_BUILD_STATIC=ON``. They are not currently
supported as standalone installed targets because their exported link
interfaces do not include every third-party dependency. Installed consumers
should use the shared targets.

Optional plugins (built-in file formats, file systems, and index)
-----------------------------------------------------------------
Expand All @@ -75,21 +94,23 @@ Paimon provides a set of built-in optional plugins that you can link to as neede

- File format plugins:

- ``Paimon::paimon_parquet_file_format_shared`` / ``Paimon::paimon_parquet_file_format_static``
- ``Paimon::paimon_orc_file_format_shared`` / ``Paimon::paimon_orc_file_format_static``
- ``Paimon::paimon_avro_file_format_shared`` / ``Paimon::paimon_avro_file_format_static``
- ``Paimon::paimon_blob_file_format_shared`` / ``Paimon::paimon_blob_file_format_static``
- ``Paimon::paimon_parquet_file_format_shared``
- ``Paimon::paimon_orc_file_format_shared``
- ``Paimon::paimon_avro_file_format_shared``
- ``Paimon::paimon_blob_file_format_shared``

- File system plugins:

- ``Paimon::paimon_local_file_system_shared`` / ``Paimon::paimon_local_file_system_static``
- ``Paimon::paimon_jindo_file_system_shared`` / ``Paimon::paimon_jindo_file_system_static``
- ``Paimon::paimon_local_file_system_shared``
- ``Paimon::paimon_jindo_file_system_shared``

- Index plugins:

- ``Paimon::paimon_file_index_shared`` / ``Paimon::paimon_file_index_static``
- ``Paimon::paimon_lumina_index_shared`` / ``Paimon::paimon_lumina_index_static``
- ``Paimon::paimon_file_index_shared``
- ``Paimon::paimon_lumina_index_shared``

.. note::

In most cases, it is recommended to use the shared variants of these plugins.
Static plugin targets have the same installed-consumer limitation as
``Paimon::paimon_static`` and should not be used as standalone imported
targets.
11 changes: 9 additions & 2 deletions docs/source/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ repository:

$ git clone https://github.com/alibaba/paimon-cpp.git
$ cd paimon-cpp
$ git lfs pull

Manual configuration
--------------------
Expand Down Expand Up @@ -180,14 +179,22 @@ require project-specific patches, so their supported source values are
-Dzstd_SOURCE=BUNDLED

Use ``PAIMON_PACKAGE_PREFIX`` to provide one common prefix for dependencies
whose own ``<Package>_ROOT`` variable is not set.
whose own ``<Package>_ROOT`` variable is not set. Because the patched Arrow and
ORC dependencies cannot be resolved from the system, a global ``SYSTEM`` build
must override them to ``BUNDLED``:

.. code-block:: shell

cmake -B build \
-DPAIMON_DEPENDENCY_SOURCE=SYSTEM \
-DArrow_SOURCE=BUNDLED \
-DORC_SOURCE=BUNDLED \
-DPAIMON_PACKAGE_PREFIX=/opt/paimon-deps

All other enabled dependencies must be available as system packages or under
the specified prefix. When ORC support is disabled, the ``ORC_SOURCE`` override
can be omitted.

Package-manager-specific modes are intentionally out of scope for this first
dependency source interface. They can still be used through standard CMake
mechanisms such as ``CMAKE_PREFIX_PATH`` or ``CMAKE_TOOLCHAIN_FILE``, while
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ native engines to access the Paimon datalake format with maximum efficiency.
:class-card: contrib-card
:shadow: none

Explore Paimon‘s API reference documentation
Explore Paimon's API reference documentation

+++

Expand Down
4 changes: 2 additions & 2 deletions docs/source/user_guide/arrow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ costs and increasing long-term maintenance complexity.
Adopting the Arrow C Data Interface
-----------------------------------

To leverage Arrow’s performance and ecosystem benefits while avoiding tight
To leverage Arrow's performance and ecosystem benefits while avoiding tight
coupling to specific Arrow C++ SDK versions, we use the Arrow C Data
Interface as the default in-memory format for Paimon C++.

Expand Down Expand Up @@ -111,7 +111,7 @@ Memory management

Nullability and validity
~~~~~~~~~~~~~~~~~~~~~~~~
- Use standard validity bitmaps for nullability and adhere to Arrow’s canonical buffer organization (validity, offsets, data, etc.).
- Use standard validity bitmaps for nullability and adhere to Arrow's canonical buffer organization (validity, offsets, data, etc.).

Conversion boundaries
~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/clean.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Detailed Steps
1. Build a ``ScanFilter`` for the partition and use the latest snapshot
to scan the partition.
2. Iterate over the scanned data file list (``ManifestEntries``) and
rewrite each entry’s type to ``DELETE``.
rewrite each entry's type to ``DELETE``.
3. Commit using the rewritten ``ManifestEntries``. If the commit fails,
retry a limited number of times.

Expand Down
8 changes: 4 additions & 4 deletions docs/source/user_guide/commit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Commit
==========================================

Commit is a critical stage in Paimon’s write path. It is responsible for generating
Commit is a critical stage in Paimon's write path. It is responsible for generating
Snapshot files that describe the current state of a Paimon table. This document
provides a detailed analysis of the Paimon Commit process.

Expand All @@ -41,7 +41,7 @@ Collect File Changes
~~~~~~~~~~~~~~~~~~~~~~~~

During Commit, the system extracts key information from ``CommitMessages``—such as
file name, operation type (``ADD`` or ``DELETE``), the file’s Partition and Bucket—
file name, operation type (``ADD`` or ``DELETE``), the file's Partition and Bucket—
and converts them into ``ManifestEntry`` records.

A ``ManifestEntry`` represents a single operation record in a manifest file and
Expand Down Expand Up @@ -80,7 +80,7 @@ classifies them as follows:
Minor Compaction
^^^^^^^^^^^^^^^^

If Full Compaction’s conditions are not met, Minor Compaction is attempted:
If Full Compaction's conditions are not met, Minor Compaction is attempted:

- The system iterates over all files, skipping any file larger than the target file size.
- Whenever the accumulated size of selected files exceeds the target file size, those files are merged.
Expand All @@ -98,7 +98,7 @@ Generate the Base Manifest List

After compaction (which may or may not be triggered every time), the system obtains
a consolidated set of manifest file metadata. This metadata is written into a new
manifest list file, forming the Snapshot’s base manifest list.
manifest list file, forming the Snapshot's base manifest list.

Generate New Manifest Files and the Delta Manifest List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading
Loading