This is an automated email from the ASF dual-hosted git repository.

JingsongLi pushed a commit to branch release-2.0
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/release-2.0 by this push:
     new 0a33eca8b4 [release] Fix release package contents
0a33eca8b4 is described below

commit 0a33eca8b460ef2c2c970627986532bc6f6631d8
Author: JingsongLi <[email protected]>
AuthorDate: Fri Jul 31 23:16:25 2026 +0800

    [release] Fix release package contents
---
 .github/workflows/release-python.yml               |   5 ++++
 .gitignore                                         |   1 -
 paimon-python/MANIFEST.in                          |   1 +
 .../src/test/resources/function/hive-test-udfs.jar | Bin 35660 -> 0 bytes
 .../src/test/resources/function/hive-test-udfs.jar | Bin 35660 -> 0 bytes
 .../src/test/resources/function/hive-test-udfs.jar | Bin 35660 -> 0 bytes
 .../src/test/resources/function/hive-test-udfs.jar | Bin 35660 -> 0 bytes
 .../hive/contrib/udf/example/UDFExampleAdd2.java   |  33 +++++++++++++++++++++
 .../src/test/resources/function/hive-test-udfs.jar | Bin 35660 -> 0 bytes
 .../paimon/spark/function/FunctionResources.scala  |  31 +++++++++++++++++--
 .../src/test/resources/function/hive-test-udfs.jar | Bin 35660 -> 0 bytes
 tools/releasing/create_source_release.sh           |   9 +++++-
 12 files changed, 75 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/release-python.yml 
b/.github/workflows/release-python.yml
index 829e245b9e..0754737751 100644
--- a/.github/workflows/release-python.yml
+++ b/.github/workflows/release-python.yml
@@ -114,6 +114,9 @@ jobs:
               for required in ("LICENSE", "NOTICE", "README.md", "setup.py"):
                   if prefix + required not in names:
                       raise SystemExit("Missing {} from 
sdist".format(required))
+              sample_data = "pypaimon/sample/data/data.jsonl"
+              if prefix + sample_data not in names:
+                  raise SystemExit("Missing sample data from sdist")
 
           with zipfile.ZipFile(wheels[0]) as archive:
               names = archive.namelist()
@@ -127,6 +130,8 @@ jobs:
               ]
               if not license_files or not notice_files:
                   raise SystemExit("Wheel is missing LICENSE or NOTICE")
+              if "pypaimon/sample/data/data.jsonl" not in names:
+                  raise SystemExit("Wheel is missing sample data")
           PY
 
       - name: Upload PyPaimon distributions
diff --git a/.gitignore b/.gitignore
index 909974e43f..54381f82eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,7 +29,6 @@ dependency-reduced-pom.xml
 metastore_db/
 *.class
 *.jar
-!**/resources/**/*.jar
 *.log
 .java-version
 .version.properties
diff --git a/paimon-python/MANIFEST.in b/paimon-python/MANIFEST.in
index 30776ec52c..0600d5a49b 100644
--- a/paimon-python/MANIFEST.in
+++ b/paimon-python/MANIFEST.in
@@ -20,4 +20,5 @@ include NOTICE
 include dev/requirements.txt
 include README.md
 recursive-include pypaimon *.py
+recursive-include pypaimon/sample/data *.jsonl
 recursive-exclude pypaimon/tests *
diff --git 
a/paimon-spark/paimon-spark-3.4/src/test/resources/function/hive-test-udfs.jar 
b/paimon-spark/paimon-spark-3.4/src/test/resources/function/hive-test-udfs.jar
deleted file mode 100644
index a5bfa456f6..0000000000
Binary files 
a/paimon-spark/paimon-spark-3.4/src/test/resources/function/hive-test-udfs.jar 
and /dev/null differ
diff --git 
a/paimon-spark/paimon-spark-3.5/src/test/resources/function/hive-test-udfs.jar 
b/paimon-spark/paimon-spark-3.5/src/test/resources/function/hive-test-udfs.jar
deleted file mode 100644
index a5bfa456f6..0000000000
Binary files 
a/paimon-spark/paimon-spark-3.5/src/test/resources/function/hive-test-udfs.jar 
and /dev/null differ
diff --git 
a/paimon-spark/paimon-spark-4.0/src/test/resources/function/hive-test-udfs.jar 
b/paimon-spark/paimon-spark-4.0/src/test/resources/function/hive-test-udfs.jar
deleted file mode 100644
index a5bfa456f6..0000000000
Binary files 
a/paimon-spark/paimon-spark-4.0/src/test/resources/function/hive-test-udfs.jar 
and /dev/null differ
diff --git 
a/paimon-spark/paimon-spark-4.1/src/test/resources/function/hive-test-udfs.jar 
b/paimon-spark/paimon-spark-4.1/src/test/resources/function/hive-test-udfs.jar
deleted file mode 100644
index a5bfa456f6..0000000000
Binary files 
a/paimon-spark/paimon-spark-4.1/src/test/resources/function/hive-test-udfs.jar 
and /dev/null differ
diff --git 
a/paimon-spark/paimon-spark-ut/src/test/java/org/apache/hadoop/hive/contrib/udf/example/UDFExampleAdd2.java
 
b/paimon-spark/paimon-spark-ut/src/test/java/org/apache/hadoop/hive/contrib/udf/example/UDFExampleAdd2.java
new file mode 100644
index 0000000000..40fe6196d8
--- /dev/null
+++ 
b/paimon-spark/paimon-spark-ut/src/test/java/org/apache/hadoop/hive/contrib/udf/example/UDFExampleAdd2.java
@@ -0,0 +1,33 @@
+/*
+ * 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.hadoop.hive.contrib.udf.example;
+
+import org.apache.hadoop.hive.ql.exec.UDF;
+
+/** Test Hive UDF used by the Spark function tests. */
+public class UDFExampleAdd2 extends UDF {
+
+    public Integer evaluate(Integer left, Integer right) {
+        return left + right;
+    }
+
+    public Double evaluate(Double left, Double right) {
+        return left + right;
+    }
+}
diff --git 
a/paimon-spark/paimon-spark-ut/src/test/resources/function/hive-test-udfs.jar 
b/paimon-spark/paimon-spark-ut/src/test/resources/function/hive-test-udfs.jar
deleted file mode 100644
index a5bfa456f6..0000000000
Binary files 
a/paimon-spark/paimon-spark-ut/src/test/resources/function/hive-test-udfs.jar 
and /dev/null differ
diff --git 
a/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/function/FunctionResources.scala
 
b/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/function/FunctionResources.scala
index 1232c3ffa6..37e3209fc1 100644
--- 
a/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/function/FunctionResources.scala
+++ 
b/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/function/FunctionResources.scala
@@ -18,17 +18,42 @@
 
 package org.apache.paimon.spark.function
 
+import org.apache.hadoop.hive.contrib.udf.example.UDFExampleAdd2
 import org.apache.spark.sql.Row
 import org.apache.spark.sql.expressions.{MutableAggregationBuffer, 
UserDefinedAggregateFunction}
 import org.apache.spark.sql.types.{DataType, IntegerType, StructType}
 
-object FunctionResources {
+import java.io.{File, FileOutputStream}
+import java.util.jar.{JarEntry, JarOutputStream}
 
-  val testUDFJarPath: String =
-    getClass.getClassLoader.getResource("function/hive-test-udfs.jar").getPath
+object FunctionResources {
 
   val UDFExampleAdd2Class: String = 
"org.apache.hadoop.hive.contrib.udf.example.UDFExampleAdd2"
 
+  val testUDFJarPath: String = {
+    val classResource = UDFExampleAdd2Class.replace('.', '/') + ".class"
+    val input = 
classOf[UDFExampleAdd2].getClassLoader.getResourceAsStream(classResource)
+    val jarFile = File.createTempFile("hive-test-udfs", ".jar")
+    jarFile.deleteOnExit()
+
+    val output = new JarOutputStream(new FileOutputStream(jarFile))
+    try {
+      output.putNextEntry(new JarEntry(classResource))
+      val buffer = new Array[Byte](8192)
+      var bytesRead = input.read(buffer)
+      while (bytesRead != -1) {
+        output.write(buffer, 0, bytesRead)
+        bytesRead = input.read(buffer)
+      }
+      output.closeEntry()
+    } finally {
+      input.close()
+      output.close()
+    }
+
+    jarFile.getAbsolutePath
+  }
+
   val MyIntSumClass: String = "org.apache.paimon.spark.function.MyIntSum"
 }
 
diff --git 
a/paimon-spark/paimon-spark4-common/src/test/resources/function/hive-test-udfs.jar
 
b/paimon-spark/paimon-spark4-common/src/test/resources/function/hive-test-udfs.jar
deleted file mode 100644
index a5bfa456f6..0000000000
Binary files 
a/paimon-spark/paimon-spark4-common/src/test/resources/function/hive-test-udfs.jar
 and /dev/null differ
diff --git a/tools/releasing/create_source_release.sh 
b/tools/releasing/create_source_release.sh
index 5a5a17f630..9a391920ad 100755
--- a/tools/releasing/create_source_release.sh
+++ b/tools/releasing/create_source_release.sh
@@ -77,6 +77,13 @@ rsync -a \
   --exclude ".travis.yml" \
   . paimon-${RELEASE_VERSION}
 
+UNEXPECTED_BINARY=$(find paimon-${RELEASE_VERSION} -type f \
+  \( -name "*.class" -o -name "*.jar" \) -print -quit)
+if [ -n "${UNEXPECTED_BINARY}" ]; then
+    echo "Source release contains a compiled binary: ${UNEXPECTED_BINARY}" >&2
+    exit 1
+fi
+
 tar czf ${RELEASE_DIR}/apache-paimon-${RELEASE_VERSION}-src.tgz --no-xattrs 
paimon-${RELEASE_VERSION}
 gpg --armor --detach-sig 
${RELEASE_DIR}/apache-paimon-${RELEASE_VERSION}-src.tgz
 cd ${RELEASE_DIR}
@@ -86,4 +93,4 @@ rm -rf ${CLONE_DIR}
 
 echo "Done. Source release package and signatures created under 
${RELEASE_DIR}/."
 
-cd ${CURR_DIR}
\ No newline at end of file
+cd ${CURR_DIR}

Reply via email to