This is an automated email from the ASF dual-hosted git repository.
XiaoHongbo-Hope pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-full-text.git
The following commit(s) were added to refs/heads/main by this push:
new f046265 Merge pull request #12 from
jianguotian/fix/asf-license-headers
f046265 is described below
commit f046265cf1dc8ea04622b202c07d9ffb2936e07a
Author: jianguotian <[email protected]>
AuthorDate: Thu Jul 9 14:13:23 2026 +0800
Merge pull request #12 from jianguotian/fix/asf-license-headers
Fix ASF license headers
---
.github/workflows/ci.yml | 3 +
Cargo.toml | 17 +++++
README.md | 19 +++++
core/Cargo.toml | 17 +++++
core/src/archive_directory.rs | 17 +++++
core/src/config.rs | 17 +++++
core/src/error.rs | 17 +++++
core/src/index.rs | 17 +++++
core/src/io.rs | 17 +++++
core/src/lib.rs | 17 +++++
core/src/query.rs | 17 +++++
core/src/storage.rs | 17 +++++
core/src/tokenizer.rs | 17 +++++
core/tests/core_roundtrip.rs | 17 +++++
docs/java-api.md | 19 +++++
docs/paimon-integration.md | 19 +++++
docs/python-api.md | 19 +++++
docs/storage-format.md | 19 +++++
ffi/Cargo.toml | 17 +++++
ffi/src/lib.rs | 17 +++++
include/paimon_ftindex.h | 19 +++++
.../paimon/index/fulltext/FullTextIndexInput.java | 19 +++++
.../paimon/index/fulltext/FullTextIndexOutput.java | 19 +++++
.../paimon/index/fulltext/FullTextIndexReader.java | 19 +++++
.../paimon/index/fulltext/FullTextIndexWriter.java | 19 +++++
.../paimon/index/fulltext/FullTextNative.java | 19 +++++
.../paimon/index/fulltext/FullTextReadMetrics.java | 19 +++++
.../index/fulltext/FullTextSearchResult.java | 19 +++++
.../fulltext/FullTextNativeRoundTripTest.java | 19 +++++
jni/Cargo.toml | 17 +++++
jni/src/lib.rs | 17 +++++
python/paimon_ftindex/__init__.py | 17 +++++
python/paimon_ftindex/_ffi.py | 17 +++++
python/paimon_ftindex/reader.py | 17 +++++
python/paimon_ftindex/writer.py | 17 +++++
python/pyproject.toml | 17 +++++
python/tests/test_roundtrip.py | 17 +++++
tools/README.md | 19 +++++
tools/check_license_headers.py | 88 ++++++++++++++++++++++
39 files changed, 750 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fa12d21..44528b9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,6 +54,9 @@ jobs:
- name: Validate .asf.yaml
run: pip install pyyaml -q && python3 tools/validate_asf_yaml.py
+ - name: Check ASF license headers
+ run: python3 tools/check_license_headers.py
+
- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
diff --git a/Cargo.toml b/Cargo.toml
index 79f1c14..67ad420 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
[workspace]
members = ["core", "ffi", "jni"]
resolver = "2"
diff --git a/README.md b/README.md
index 7b9691c..31861cf 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Apache Paimon Full Text Index
Standalone Tantivy-based full-text index library for Apache Paimon-style data
diff --git a/core/Cargo.toml b/core/Cargo.toml
index b7690a5..d396f54 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
[package]
name = "paimon-ftindex-core"
version = "0.1.0"
diff --git a/core/src/archive_directory.rs b/core/src/archive_directory.rs
index 5da9da5..717b283 100644
--- a/core/src/archive_directory.rs
+++ b/core/src/archive_directory.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use crate::error::{FtIndexError, Result};
use crate::io::{ReadMetrics, ReadRequest, SeekRead};
use crate::storage::ArchiveFileEntry;
diff --git a/core/src/config.rs b/core/src/config.rs
index 295f1a7..425e8b1 100644
--- a/core/src/config.rs
+++ b/core/src/config.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use crate::tokenizer::TokenizerConfig;
use crate::{FtIndexError, Result};
use serde::{Deserialize, Serialize};
diff --git a/core/src/error.rs b/core/src/error.rs
index d4d9598..5d7bfb8 100644
--- a/core/src/error.rs
+++ b/core/src/error.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use thiserror::Error;
pub type Result<T> = std::result::Result<T, FtIndexError>;
diff --git a/core/src/index.rs b/core/src/index.rs
index f026d50..0738c57 100644
--- a/core/src/index.rs
+++ b/core/src/index.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use crate::archive_directory::ArchiveDirectory;
use crate::config::{FullTextIndexConfig, FullTextIndexMetadata};
use crate::error::{FtIndexError, Result};
diff --git a/core/src/io.rs b/core/src/io.rs
index e8abe11..28c8865 100644
--- a/core/src/io.rs
+++ b/core/src/io.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use std::io;
use std::sync::atomic::{AtomicU64, Ordering};
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 15bc5f1..291aac3 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
mod archive_directory;
pub mod config;
pub mod error;
diff --git a/core/src/query.rs b/core/src/query.rs
index eb1f0f3..3b82d89 100644
--- a/core/src/query.rs
+++ b/core/src/query.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use crate::error::{FtIndexError, Result};
use serde::de::Error as DeError;
use serde::{Deserialize, Deserializer, Serialize};
diff --git a/core/src/storage.rs b/core/src/storage.rs
index d5ca294..e8322a0 100644
--- a/core/src/storage.rs
+++ b/core/src/storage.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use crate::config::FullTextIndexMetadata;
use crate::error::{FtIndexError, Result};
use crate::io::{ReadRequest, SeekRead, SeekWrite};
diff --git a/core/src/tokenizer.rs b/core/src/tokenizer.rs
index 70c1956..b99de03 100644
--- a/core/src/tokenizer.rs
+++ b/core/src/tokenizer.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use crate::error::{FtIndexError, Result};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
diff --git a/core/tests/core_roundtrip.rs b/core/tests/core_roundtrip.rs
index 4064f17..2695191 100644
--- a/core/tests/core_roundtrip.rs
+++ b/core/tests/core_roundtrip.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use paimon_ftindex_core::io::{PosWriter, ReadRequest, SeekRead, SliceReader};
use paimon_ftindex_core::storage::{read_header, write_envelope,
ArchiveFileEntry, IndexHeader};
use paimon_ftindex_core::{
diff --git a/docs/java-api.md b/docs/java-api.md
index ecce6dd..5f4370e 100644
--- a/docs/java-api.md
+++ b/docs/java-api.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Java API
Package:
diff --git a/docs/paimon-integration.md b/docs/paimon-integration.md
index a0aaaa2..78683ae 100644
--- a/docs/paimon-integration.md
+++ b/docs/paimon-integration.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Paimon Integration
The standalone library is intentionally independent of Paimon core. Paimon
diff --git a/docs/python-api.md b/docs/python-api.md
index 58c0c80..557d16b 100644
--- a/docs/python-api.md
+++ b/docs/python-api.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Python API
Package:
diff --git a/docs/storage-format.md b/docs/storage-format.md
index 8fc9130..2bdf764 100644
--- a/docs/storage-format.md
+++ b/docs/storage-format.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Storage Format
Version 1 uses a front-loaded self-describing envelope:
diff --git a/ffi/Cargo.toml b/ffi/Cargo.toml
index eafe046..1959704 100644
--- a/ffi/Cargo.toml
+++ b/ffi/Cargo.toml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
[package]
name = "paimon-ftindex-ffi"
version = "0.1.0"
diff --git a/ffi/src/lib.rs b/ffi/src/lib.rs
index 0818b52..60b7921 100644
--- a/ffi/src/lib.rs
+++ b/ffi/src/lib.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
#![allow(clippy::missing_safety_doc)]
use paimon_ftindex_core::io::{ReadRequest, SeekRead, SeekWrite};
diff --git a/include/paimon_ftindex.h b/include/paimon_ftindex.h
index 1fd4cdd..06a0f01 100644
--- a/include/paimon_ftindex.h
+++ b/include/paimon_ftindex.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#ifndef PAIMON_FTINDEX_H
#define PAIMON_FTINDEX_H
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexInput.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexInput.java
index 990870d..14b44f5 100644
---
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexInput.java
+++
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexInput.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
import java.io.IOException;
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexOutput.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexOutput.java
index c64f405..e5275f6 100644
---
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexOutput.java
+++
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexOutput.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
import java.io.IOException;
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexReader.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexReader.java
index 8137c18..60ec6c0 100644
---
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexReader.java
+++
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexReader.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
public final class FullTextIndexReader implements AutoCloseable {
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexWriter.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexWriter.java
index 22804d7..776c851 100644
---
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexWriter.java
+++
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextIndexWriter.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
import java.util.Map;
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextNative.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextNative.java
index 5c68c3e..f249f93 100644
--- a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextNative.java
+++ b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextNative.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
import java.io.File;
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextReadMetrics.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextReadMetrics.java
index 79f909f..b17d2ad 100644
---
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextReadMetrics.java
+++
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextReadMetrics.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
public final class FullTextReadMetrics {
diff --git
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextSearchResult.java
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextSearchResult.java
index dd5dd38..6891338 100644
---
a/java/src/main/java/org/apache/paimon/index/fulltext/FullTextSearchResult.java
+++
b/java/src/main/java/org/apache/paimon/index/fulltext/FullTextSearchResult.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
public final class FullTextSearchResult {
diff --git
a/java/src/test/java/org/apache/paimon/index/fulltext/FullTextNativeRoundTripTest.java
b/java/src/test/java/org/apache/paimon/index/fulltext/FullTextNativeRoundTripTest.java
index 6b35280..95bb8ad 100644
---
a/java/src/test/java/org/apache/paimon/index/fulltext/FullTextNativeRoundTripTest.java
+++
b/java/src/test/java/org/apache/paimon/index/fulltext/FullTextNativeRoundTripTest.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.apache.paimon.index.fulltext;
import org.junit.Test;
diff --git a/jni/Cargo.toml b/jni/Cargo.toml
index 13b4750..90eeb3c 100644
--- a/jni/Cargo.toml
+++ b/jni/Cargo.toml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
[package]
name = "paimon-ftindex-jni"
version = "0.1.0"
diff --git a/jni/src/lib.rs b/jni/src/lib.rs
index 03e71cd..20f418f 100644
--- a/jni/src/lib.rs
+++ b/jni/src/lib.rs
@@ -1,3 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
use jni::objects::{GlobalRef, JByteArray, JClass, JObject, JObjectArray,
JString, JValue};
use jni::sys::{jint, jlong, jobject};
use jni::{JNIEnv, JavaVM};
diff --git a/python/paimon_ftindex/__init__.py
b/python/paimon_ftindex/__init__.py
index 980574a..a614fcf 100644
--- a/python/paimon_ftindex/__init__.py
+++ b/python/paimon_ftindex/__init__.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
from .reader import FullTextIndexReader, FullTextReadMetrics
from .writer import FullTextIndexWriter
diff --git a/python/paimon_ftindex/_ffi.py b/python/paimon_ftindex/_ffi.py
index 931c972..14b72ba 100644
--- a/python/paimon_ftindex/_ffi.py
+++ b/python/paimon_ftindex/_ffi.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import ctypes
import os
import platform
diff --git a/python/paimon_ftindex/reader.py b/python/paimon_ftindex/reader.py
index 75f2080..5c087ee 100644
--- a/python/paimon_ftindex/reader.py
+++ b/python/paimon_ftindex/reader.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import ctypes
from dataclasses import dataclass
from ctypes import c_float, c_int64, c_size_t, c_uint8, c_void_p
diff --git a/python/paimon_ftindex/writer.py b/python/paimon_ftindex/writer.py
index 7d3bb97..6f609a9 100644
--- a/python/paimon_ftindex/writer.py
+++ b/python/paimon_ftindex/writer.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import ctypes
from ctypes import c_char_p, c_void_p
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 85fb0f2..97e8442 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
diff --git a/python/tests/test_roundtrip.py b/python/tests/test_roundtrip.py
index b54cc47..d6c4d53 100644
--- a/python/tests/test_roundtrip.py
+++ b/python/tests/test_roundtrip.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
from io import BytesIO
import struct
diff --git a/tools/README.md b/tools/README.md
index f2bfa48..42cd151 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -1,3 +1,22 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
# Release tools
This directory contains helper scripts used by release managers and committers.
diff --git a/tools/check_license_headers.py b/tools/check_license_headers.py
new file mode 100755
index 0000000..0c563d4
--- /dev/null
+++ b/tools/check_license_headers.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python3
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Validate ASF license headers on tracked text files."""
+
+from __future__ import annotations
+
+import subprocess
+import sys
+from pathlib import Path
+
+
+ASF_HEADER_TOKEN = "Licensed to the Apache Software Foundation"
+
+EXEMPT_FILES = {
+ "Cargo.lock",
+ # Generated dependency license report. CI verifies it against cargo-deny
output.
+ "DEPENDENCIES.rust.tsv",
+ "LICENSE",
+ "NOTICE",
+ # Golden test data; adding comments changes the fixture format.
+ "core/tests/golden/storage_v1_envelope.hex",
+}
+
+
+def repo_root() -> Path:
+ return Path(
+ subprocess.check_output(["git", "rev-parse", "--show-toplevel"],
text=True).strip()
+ )
+
+
+def tracked_files(root: Path) -> list[str]:
+ output = subprocess.check_output(["git", "-C", str(root), "ls-files"],
text=True)
+ return output.splitlines()
+
+
+def is_text_file(path: Path) -> bool:
+ return b"\0" not in path.read_bytes()
+
+
+def has_asf_header(path: Path) -> bool:
+ lines = path.read_text(encoding="utf-8", errors="replace").splitlines()
+ return ASF_HEADER_TOKEN in "\n".join(lines[:80])
+
+
+def main() -> int:
+ root = repo_root()
+ missing = []
+
+ for file_name in tracked_files(root):
+ if file_name in EXEMPT_FILES:
+ continue
+
+ path = root / file_name
+ if not path.is_file() or not is_text_file(path):
+ continue
+
+ if not has_asf_header(path):
+ missing.append(file_name)
+
+ if missing:
+ print("Files missing ASF license headers:", file=sys.stderr)
+ for file_name in missing:
+ print(f" {file_name}", file=sys.stderr)
+ return 1
+
+ print("All tracked text files have ASF license headers or are explicitly
exempt.")
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())