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
14 changes: 8 additions & 6 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ github:
enabled_merge_buttons:
merge: false
squash: true
rebase: true
rebase: false
rulesets:
- name: "Branch Protection"
type: branch
Expand All @@ -52,17 +52,19 @@ github:
required_status_checks:
- name: "pre-commit"
app_slug: -1
- name: "gcc-test"
app_slug: -1
- name: "rat-license-check"
app_slug: -1
- name: "test-with-sanitizer"
- name: "asan-ubsan"
app_slug: -1
- name: "tsan"
app_slug: -1
- name: "clang-debug"
app_slug: -1
- name: "clang-release"
app_slug: -1
- name: "gcc-release"
- name: "gcc-debug"
app_slug: -1
- name: "clang-test"
- name: "gcc-release"
app_slug: -1
- name: "gcc8-test"
app_slug: -1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
cc: gcc-14
cxx: g++-14
- name: clang-debug
# fetch_depth: '0' # fetch the PR target branch history for clang-tidy
# build_args: >-
# --check_clang_tidy
# --lint_git_target_commit "origin/${{ github.base_ref || github.event.repository.default_branch }}"
fetch_depth: '0' # fetch the PR target branch history for clang-tidy
build_args: >-
--check_clang_tidy
--lint_git_target_commit "origin/${{ github.base_ref || github.event.repository.default_branch }}"
- name: asan-ubsan
build_args: --enable_asan --enable_ubsan
- name: tsan
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release_candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ jobs:
name: source-archive
path: release/ci

- name: Install Rust toolchain (tantivy-fts)
shell: bash
run: ci/scripts/setup_rust.sh

- name: Install HTTP and TLS development dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev

- name: Verify, build, test, and install
shell: bash
env:
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ option(PAIMON_ENABLE_JINDO "Whether to enable jindo file system" OFF)
option(PAIMON_ENABLE_S3 "Whether to enable S3 file system" OFF)
option(PAIMON_ENABLE_NETWORK_TESTS
"Whether to enable tests that access real remote services over the network" OFF)
option(PAIMON_ENABLE_LUMINA "Whether to enable lumina vector index" OFF)
option(PAIMON_ENABLE_LUCENE "Whether to enable lucene index" OFF)
option(PAIMON_ENABLE_TANTIVY
"Whether to enable tantivy-fulltext global index (Rust FFI, experimental)" OFF)
Expand Down Expand Up @@ -485,7 +486,7 @@ include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/PaimonConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)
COMPATIBILITY SameMinorVersion)

configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/PaimonConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/PaimonConfig.cmake"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Before submitting, please verify:
### Prerequisites

- **C++17** compatible compiler (GCC recommended)
- **CMake** ≥ 3.16
- **CMake** ≥ 3.22
- **Python 3** (for linting scripts and pre-commit)

---
Expand Down
10 changes: 0 additions & 10 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -429,16 +429,6 @@ License: https://www.apache.org/licenses/LICENSE-2.0

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

This product includes code from LucenePlusPlus.

* LucenePlusPlus utility in src/paimon/global_index/lucene/ directory

Copyright: 2009-2014 Alan Wright.
Home page: https://github.com/luceneplusplus/LucenePlusPlus
License: https://www.apache.org/licenses/LICENSE-2.0

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

This product includes code derived from PyTorch TH simd.h.

* SIMD detection code in third_party/roaring_bitmap/roaring.cpp
Expand Down
5 changes: 0 additions & 5 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,5 @@ PalDB

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

This product includes software from LucenePlusPlus project (Apache 2.0)
Copyright 2009-2014 Alan Wright.

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

JindoSDK NextArch C++
Copyright 2024-present Alibaba Cloud.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ It provides native, high-performance, and extensible access to the Paimon lake f

Background and documentation are available at [paimon.apache.org](https://paimon.apache.org).

## Status

Paimon-cpp is currently undergoing repository migration. The original repository is hosted at [github.com/alibaba/paimon-cpp](https://github.com/alibaba/paimon-cpp/), and the codebase is being migrated incrementally to the Apache Paimon community repository.

## Features

Paimon-cpp currently provides:
Expand All @@ -53,7 +49,7 @@ Paimon-cpp currently provides:
> Paimon C++ therefore currently treats the `bitmap` global index type as unsupported. The legacy
> implementation remains in the codebase pending migration to the Java-compatible format.

Note: Linux x86_64 and macOS arm64 builds are currently verified.
Note: Only Linux x86_64 builds are currently supported and verified.

## Building

Expand Down
2 changes: 1 addition & 1 deletion docs/source/build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for data format and file system.

.. code-block:: cmake

cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)

project(MyExample)

Expand Down
31 changes: 4 additions & 27 deletions docs/source/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ out-of-source. For example, you could create ``paimon-cpp/build`` and invoke

Building requires:

* A C++17-enabled compiler. On Linux, gcc 8 and higher should be
sufficient. On macOS, use AppleClang from Xcode Command Line Tools or
LLVM clang from Homebrew. Windows is not supported for now.
* A C++17-enabled compiler. On Linux, gcc 8 and higher should be sufficient.
macOS and Windows are not supported for now.
* At least 2GB of RAM for a minimal build, 8GB for a minimal
debug build with tests and 16GB for a full build.

Expand All @@ -46,29 +45,6 @@ On Ubuntu/Debian you can install the requirements with:
build-essential \
cmake

On macOS you can install the requirements with:

.. code-block:: shell

xcode-select --install
brew install cmake

The same CMake build options apply on Linux and macOS. If you prefer upstream
LLVM clang instead of AppleClang on macOS, install LLVM and pass the Homebrew
compiler paths when configuring:

.. code-block:: shell

brew install llvm
cmake -B build \
-DCMAKE_C_COMPILER="$(brew --prefix llvm)/bin/clang" \
-DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++"

When building with upstream Clang on macOS, Paimon uses Apple SDK libc++
headers by default to avoid incompatibilities in bundled third-party
dependencies. Pass ``-DPAIMON_USE_APPLE_LIBCXX_WITH_CLANG=OFF`` to disable
this behavior.

We also provide a docker template to help you get started quickly. See in
``.devcontainer`` folder for more details.

Expand Down Expand Up @@ -149,6 +125,7 @@ boolean flags to ``cmake``.
* ``-DPAIMON_ENABLE_JINDO=ON``: Support for Alibaba Jindo filesystems
* ``-DPAIMON_ENABLE_LUMINA=ON``: Support for the Lumina vector index.
* ``-DPAIMON_ENABLE_LUCENE=ON``: Support for Lucene full-text search indexes
* ``-DPAIMON_ENABLE_TANTIVY=ON``: Enable the experimental Tantivy full-text index Rust FFI.

Third-party dependency source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -241,7 +218,7 @@ several times with different options if you want to exercise all of them.
CMake version requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~

We support CMake 3.16 and higher.
We support CMake 3.22 and higher.

LLVM and Clang Tools
~~~~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import os
import datetime

project = u'C++ Paimon'
copyright = f'2024-{datetime.datetime.now().year} Apache Software Foundation'
project = u'Apache Paimon C++'
copyright = f'2026-{datetime.datetime.now().year} Apache Software Foundation'
author = u'Apache Software Foundation'

# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -131,7 +131,7 @@
},
],
"logo": {
"text": "Paimon C++",
"text": "Apache Paimon C++",
},
"show_version_warning_banner": True,
}
Expand All @@ -143,6 +143,6 @@
"doc_path": "docs/source",
}

html_title = f"C++ Paimon"
html_title = "Apache Paimon C++"

html_show_sourcelink = False
8 changes: 5 additions & 3 deletions docs/source/examples/benchmark.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ specific options below:

``--paimon_option=<key1>:<value1>;<key2>:<value2>``
Repeatable table options passed through to Paimon. The default table file
format is ``parquet``; use ``--paimon_option file.format:<format>`` to
override it. For ``BM_PK_Write`` and ``BM_MOR_Read``, ``bucket`` is forced to
``1``.
format is ``parquet``. Benchmark output supports ``parquet`` and, when
built with ``PAIMON_ENABLE_ORC=ON``, ``orc``; use
``--paimon_option file.format:parquet`` or
``--paimon_option file.format:orc`` to select one. For ``BM_PK_Write`` and
``BM_MOR_Read``, ``bucket`` is forced to ``1``.

Examples
========
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

.. _implementations:

C++ Paimon Documentation
========================
Apache Paimon C++
=================

Paimon C++ is a high-performance C++ implementation of Apache Paimon. We aim to
provide a native, high-performance and extensible implementation that allows
Expand Down
20 changes: 13 additions & 7 deletions docs/source/user_guide/global_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Global Index

Global Index is a powerful indexing mechanism for append-only tables.
It enables efficient row-level lookups and filtering without full-table scans.
Paimon supports multiple global index types:
Paimon C++ supports the following global index types:

- **Bitmap Index**: A bitmap-based index. Each distinct value is mapped to a compressed bitmap (RoaringBitmap) that records which rows contain that value, enabling extremely fast set membership tests.
- **BTree Index**: An efficient index based on multi-level SST files for scalar column lookups.
- **Range Bitmap Index**: A range bitmap index optimized for range predicates on ordered scalar columns. Extends the bitmap approach by encoding value ordering, enabling efficient less-than, greater-than, and range conditions.
- **Lucene Index**: A full-text search index powered by Lucene++. Supports tokenized text search with multiple modes including match-all, match-any, phrase, prefix, and wildcard queries.
- **Tantivy Full-Text Index (experimental)**: A Rust FFI-based full-text search index.
- **Vector Index (Lumina)**: An approximate nearest neighbor (ANN) index powered by Lumina for vector similarity search with configurable distance metrics.

Global indexes work on top of Data Evolution tables. To use global indexes, your table must have:
Expand All @@ -34,12 +34,10 @@ Global indexes work on top of Data Evolution tables. To use global indexes, your
- ``'row-tracking.enabled' = 'true'``
- ``'data-evolution.enabled' = 'true'``

Bitmap Index
------------
Bitmap Index Compatibility
--------------------------

A bitmap-based index for Equal and In predicates. Each distinct value in the indexed column
is mapped to a compressed bitmap (RoaringBitmap) that records which rows contain that value.
This allows extremely fast set membership tests.
The current Paimon C++ version does not support bitmap global indexes.

BTree Index
-----------
Expand Down Expand Up @@ -94,6 +92,14 @@ search modes including match-all, match-any, phrase, prefix, and wildcard querie

- **Description**: Specifies the directory containing Jieba dictionary files for Chinese text tokenization. At runtime, the system first checks this environment variable; if not set, it falls back to the compile-time ``JIEBA_TEST_DICT_DIR`` macro (only available in test builds). If neither is available, will fail with an error.

Tantivy Full-Text Index (Experimental)
---------------------------------------

The Tantivy full-text index is an experimental Rust FFI-based backend. Enable it at build time
with ``-DPAIMON_ENABLE_TANTIVY=ON``. Its global index identifier is ``tantivy-fulltext``.
Because this backend is experimental, validate its behavior and compatibility for your workload
before production use.

Vector Index (Lumina)
---------------------

Expand Down
13 changes: 5 additions & 8 deletions docs/source/user_guide/manifest_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ Overview
--------

paimon-cpp caches raw manifest file bytes at the ``ObjectsFile<T>::Read()``
layer. The cache uses the public ``Cache`` abstraction and is injected through
``ScanContextBuilder`` or ``ReadContextBuilder``. The cache covers data
manifests, manifest lists, and index manifests because they all read through
``ObjectsFile<T>``.
layer. The cache uses the public ``Cache`` abstraction and is enabled through
``ScanContextBuilder::WithCache()``. The cache covers data manifests, manifest
lists, and index manifests because they all read through ``ObjectsFile<T>``.

For repeated ``get``, ``scan``, or batch ``get/scan -f`` requests in the same
process, the same snapshot often reads the same manifest files repeatedly. On a
Expand Down Expand Up @@ -84,10 +83,8 @@ Example:
paimon::ScanContextBuilder scan_builder(table_path);
scan_builder.WithCache(cache);

paimon::ReadContextBuilder read_builder(table_path);
read_builder.WithCache(cache);

Passing ``nullptr`` or omitting ``WithCache()`` leaves manifest caching disabled.
Passing ``nullptr`` or omitting ``ScanContextBuilder::WithCache()`` leaves
manifest caching disabled.

Future Optimizations
--------------------
Expand Down
12 changes: 6 additions & 6 deletions include/paimon/utils/special_field_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ namespace paimon {
class SpecialFieldIds {
protected:
/// System defined constant for field id boundary. Value: INT32_MAX - 10000
static const int32_t CPP_FIELD_ID_END = std::numeric_limits<int32_t>::max() - 10000;
inline static constexpr int32_t CPP_FIELD_ID_END = std::numeric_limits<int32_t>::max() - 10000;

public:
/// Special field ID reserved for sequence number. Value: INT32_MAX - 1
static const int32_t SEQUENCE_NUMBER = std::numeric_limits<int32_t>::max() - 1;
inline static constexpr int32_t SEQUENCE_NUMBER = std::numeric_limits<int32_t>::max() - 1;
/// Special field ID reserved for value kind. Value: INT32_MAX - 2
static const int32_t VALUE_KIND = std::numeric_limits<int32_t>::max() - 2;
inline static constexpr int32_t VALUE_KIND = std::numeric_limits<int32_t>::max() - 2;
/// Special field ID reserved for row kind. Value: INT32_MAX - 3
static const int32_t ROW_KIND = std::numeric_limits<int32_t>::max() - 3;
inline static constexpr int32_t ROW_KIND = std::numeric_limits<int32_t>::max() - 3;
/// Special field ID reserved for row ID. Value: INT32_MAX - 5
static const int32_t ROW_ID = std::numeric_limits<int32_t>::max() - 5;
inline static constexpr int32_t ROW_ID = std::numeric_limits<int32_t>::max() - 5;

/// Special field ID reserved for index score. Value: CPP_FIELD_ID_END - 1
static const int32_t INDEX_SCORE = CPP_FIELD_ID_END - 1;
inline static constexpr int32_t INDEX_SCORE = CPP_FIELD_ID_END - 1;
};

} // namespace paimon
Loading
Loading