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

taiyang-li pushed a commit to branch fake_add_bolt_backend
in repository https://gitbox.apache.org/repos/asf/gluten.git

commit 992ce0407f0b973986547fa7349aa4701b6aaa29
Author: liyang.127 <[email protected]>
AuthorDate: Mon Jun 29 21:38:02 2026 +0800

    [GLUTEN][CORE] Share Iceberg visitor and proto helpers
    
    Move the backend-neutral Iceberg nested-field visitor, partition transform 
utility, and related protobuf schemas into backends-core so Iceberg write 
plumbing can be reused across backends without duplicating the same helper 
definitions.
---
 backends-core/pom.xml                              | 45 ++++++++++++++++++++++
 .../apache/gluten/IcebergNestedFieldVisitor.java   |  0
 .../apache/gluten/proto/IcebergNestedField.proto   |  2 +-
 .../apache/gluten/proto/IcebergPartitionSpec.proto |  2 +-
 .../iceberg/transforms/IcebergTransformUtil.scala  |  0
 5 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/backends-core/pom.xml b/backends-core/pom.xml
index 6e3fa13b70..113cbed416 100644
--- a/backends-core/pom.xml
+++ b/backends-core/pom.xml
@@ -92,4 +92,49 @@
     
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
     
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
   </build>
+
+  <profiles>
+    <profile>
+      <id>iceberg</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.google.protobuf</groupId>
+          <artifactId>protobuf-java</artifactId>
+          <version>${protobuf.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.iceberg</groupId>
+          
<artifactId>iceberg-spark-runtime-${sparkbundle.version}_${scala.binary.version}</artifactId>
+          <version>${iceberg.version}</version>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.xolstice.maven.plugins</groupId>
+            <artifactId>protobuf-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>compile-gluten-iceberg-proto</id>
+                <goals>
+                  <goal>compile</goal>
+                </goals>
+                <phase>generate-sources</phase>
+                <configuration>
+                  
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+                  
<protoSourceRoot>${project.basedir}/src-iceberg/main/resources/org/apache/gluten/proto</protoSourceRoot>
+                  <clearOutputDirectory>false</clearOutputDirectory>
+                  <checkStaleness>true</checkStaleness>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>
diff --git 
a/backends-velox/src-iceberg/main/java/org/apache/gluten/IcebergNestedFieldVisitor.java
 
b/backends-core/src-iceberg/main/java/org/apache/gluten/IcebergNestedFieldVisitor.java
similarity index 100%
rename from 
backends-velox/src-iceberg/main/java/org/apache/gluten/IcebergNestedFieldVisitor.java
rename to 
backends-core/src-iceberg/main/java/org/apache/gluten/IcebergNestedFieldVisitor.java
diff --git 
a/backends-velox/src/main/resources/org/apache/gluten/proto/IcebergNestedField.proto
 
b/backends-core/src-iceberg/main/resources/org/apache/gluten/proto/IcebergNestedField.proto
similarity index 99%
rename from 
backends-velox/src/main/resources/org/apache/gluten/proto/IcebergNestedField.proto
rename to 
backends-core/src-iceberg/main/resources/org/apache/gluten/proto/IcebergNestedField.proto
index eb5639104b..5a6956fca4 100644
--- 
a/backends-velox/src/main/resources/org/apache/gluten/proto/IcebergNestedField.proto
+++ 
b/backends-core/src-iceberg/main/resources/org/apache/gluten/proto/IcebergNestedField.proto
@@ -9,4 +9,4 @@ option java_multiple_files = true;
 message IcebergNestedField {
   int32 id = 1;
   repeated IcebergNestedField children = 2;
-}
\ No newline at end of file
+}
diff --git 
a/backends-velox/src/main/resources/org/apache/gluten/proto/IcebergPartitionSpec.proto
 
b/backends-core/src-iceberg/main/resources/org/apache/gluten/proto/IcebergPartitionSpec.proto
similarity index 99%
rename from 
backends-velox/src/main/resources/org/apache/gluten/proto/IcebergPartitionSpec.proto
rename to 
backends-core/src-iceberg/main/resources/org/apache/gluten/proto/IcebergPartitionSpec.proto
index e59fb88a9c..4718530199 100644
--- 
a/backends-velox/src/main/resources/org/apache/gluten/proto/IcebergPartitionSpec.proto
+++ 
b/backends-core/src-iceberg/main/resources/org/apache/gluten/proto/IcebergPartitionSpec.proto
@@ -26,4 +26,4 @@ message IcebergPartitionField {
 message IcebergPartitionSpec {
   int32 spec_id = 1;  // Field name uses snake_case per protobuf conventions
   repeated IcebergPartitionField fields = 2;
-}
\ No newline at end of file
+}
diff --git 
a/backends-velox/src-iceberg/main/scala/org/apache/iceberg/transforms/IcebergTransformUtil.scala
 
b/backends-core/src-iceberg/main/scala/org/apache/iceberg/transforms/IcebergTransformUtil.scala
similarity index 100%
rename from 
backends-velox/src-iceberg/main/scala/org/apache/iceberg/transforms/IcebergTransformUtil.scala
rename to 
backends-core/src-iceberg/main/scala/org/apache/iceberg/transforms/IcebergTransformUtil.scala


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to