This is an automated email from the ASF dual-hosted git repository.
hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 7e1f497b21 [GLUTEN-7910][CORE][VL] Flip dependency direction for
gluten-iceberg (#7967)
7e1f497b21 is described below
commit 7e1f497b21da3fe08489644ecbf67e0e81f637f4
Author: Hongze Zhang <[email protected]>
AuthorDate: Tue Nov 19 14:24:11 2024 +0800
[GLUTEN-7910][CORE][VL] Flip dependency direction for gluten-iceberg (#7967)
Closes #7910
---
backends-velox/pom.xml | 68 ++++++++++++++++++++++
.../gluten/execution/VeloxIcebergSuite.scala | 20 +++++++
.../gluten/execution/VeloxTPCHIcebergSuite.scala | 6 +-
gluten-iceberg/pom.xml | 13 -----
...{VeloxIcebergSuite.scala => IcebergSuite.scala} | 5 +-
5 files changed, 94 insertions(+), 18 deletions(-)
diff --git a/backends-velox/pom.xml b/backends-velox/pom.xml
index e6900e50dd..a1fcb52ce7 100755
--- a/backends-velox/pom.xml
+++ b/backends-velox/pom.xml
@@ -29,6 +29,74 @@
<tagsToExclude>org.apache.gluten.tags.UDFTest</tagsToExclude>
</properties>
</profile>
+ <profile>
+ <id>iceberg</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.gluten</groupId>
+ <artifactId>gluten-iceberg</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.gluten</groupId>
+ <artifactId>gluten-iceberg</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.iceberg</groupId>
+
<artifactId>iceberg-spark-${sparkbundle.version}_${scala.binary.version}</artifactId>
+ <version>${iceberg.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.iceberg</groupId>
+
<artifactId>iceberg-spark-runtime-${sparkbundle.version}_${scala.binary.version}</artifactId>
+ <version>${iceberg.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-iceberg-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/src/main-iceberg/scala</source>
+ <source>${project.basedir}/src/main-iceberg/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-iceberg-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/src/test-iceberg/scala</source>
+ <source>${project.basedir}/src/test-iceberg/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<dependencies>
diff --git
a/backends-velox/src/test-iceberg/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
b/backends-velox/src/test-iceberg/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
new file mode 100644
index 0000000000..1573042884
--- /dev/null
+++
b/backends-velox/src/test-iceberg/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
@@ -0,0 +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 org.apache.gluten.execution
+
+class VeloxIcebergSuite extends IcebergSuite
diff --git
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxTPCHIcebergSuite.scala
b/backends-velox/src/test-iceberg/scala/org/apache/gluten/execution/VeloxTPCHIcebergSuite.scala
similarity index 96%
rename from
gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxTPCHIcebergSuite.scala
rename to
backends-velox/src/test-iceberg/scala/org/apache/gluten/execution/VeloxTPCHIcebergSuite.scala
index 857cbcb410..5bc26e81b7 100644
---
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxTPCHIcebergSuite.scala
+++
b/backends-velox/src/test-iceberg/scala/org/apache/gluten/execution/VeloxTPCHIcebergSuite.scala
@@ -24,13 +24,13 @@ import org.apache.iceberg.spark.SparkWriteOptions
import java.io.File
class VeloxTPCHIcebergSuite extends VeloxTPCHSuite {
-
- protected val tpchBasePath: String = new File(
- "../backends-velox/src/test/resources").getAbsolutePath
+ protected val tpchBasePath: String =
+ getClass.getResource("/").getPath + "../../../src/test/resources"
override protected val resourcePath: String =
new File(tpchBasePath, "tpch-data-parquet").getCanonicalPath
+ // FIXME: Unused.
override protected val queriesResults: String =
new File(tpchBasePath, "queries-output").getCanonicalPath
diff --git a/gluten-iceberg/pom.xml b/gluten-iceberg/pom.xml
index 7289244660..bad2ec20e8 100644
--- a/gluten-iceberg/pom.xml
+++ b/gluten-iceberg/pom.xml
@@ -50,19 +50,6 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.gluten</groupId>
- <artifactId>backends-velox</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.gluten</groupId>
- <artifactId>backends-velox</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.binary.version}</artifactId>
diff --git
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
b/gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
similarity index 98%
rename from
gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
rename to
gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
index de71d341db..f5bf24d1b6 100644
---
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/VeloxIcebergSuite.scala
+++
b/gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
@@ -21,9 +21,10 @@ import org.apache.gluten.GlutenConfig
import org.apache.spark.SparkConf
import org.apache.spark.sql.Row
-class VeloxIcebergSuite extends WholeStageTransformerSuite {
-
+abstract class IcebergSuite extends WholeStageTransformerSuite {
protected val rootPath: String = getClass.getResource("/").getPath
+ // FIXME: This folder is in module backends-velox so is not accessible if
profile backends-velox
+ // is not enabled during Maven build.
override protected val resourcePath: String = "/tpch-data-parquet"
override protected val fileFormat: String = "parquet"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]