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 be5508b795 [GLUTEN-7912][VL] Flip dependency direction for
gluten-delta (#8218)
be5508b795 is described below
commit be5508b795d473a954df814ce87ba4191173e30d
Author: Hongze Zhang <[email protected]>
AuthorDate: Thu Dec 12 19:13:26 2024 +0800
[GLUTEN-7912][VL] Flip dependency direction for gluten-delta (#8218)
Closes #7912
---
backends-velox/pom.xml | 59 ++++++++++++++++++++++
.../apache/gluten/execution/VeloxDeltaSuite.scala | 19 +++++++
.../gluten/execution/VeloxTPCHDeltaSuite.scala | 5 +-
gluten-delta/pom.xml | 13 -----
.../{VeloxDeltaSuite.scala => DeltaSuite.scala} | 5 +-
.../org/apache/gluten/execution/IcebergSuite.scala | 4 +-
6 files changed, 85 insertions(+), 20 deletions(-)
diff --git a/backends-velox/pom.xml b/backends-velox/pom.xml
index 36755d7faa..2719cc6559 100755
--- a/backends-velox/pom.xml
+++ b/backends-velox/pom.xml
@@ -101,6 +101,65 @@
</plugins>
</build>
</profile>
+
+ <profile>
+ <id>delta</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.gluten</groupId>
+ <artifactId>gluten-delta</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.gluten</groupId>
+ <artifactId>gluten-delta</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.delta</groupId>
+
<artifactId>${delta.package.name}_${scala.binary.version}</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-delta-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/src/main-delta/scala</source>
+ <source>${project.basedir}/src/main-delta/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-delta-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/src/test-delta/scala</source>
+ <source>${project.basedir}/src/test-delta/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<dependencies>
diff --git
a/backends-velox/src/test-delta/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
b/backends-velox/src/test-delta/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
new file mode 100644
index 0000000000..d7a12d1fc5
--- /dev/null
+++
b/backends-velox/src/test-delta/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
@@ -0,0 +1,19 @@
+/*
+ * 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 VeloxDeltaSuite extends DeltaSuite
diff --git
a/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxTPCHDeltaSuite.scala
b/backends-velox/src/test-delta/scala/org/apache/gluten/execution/VeloxTPCHDeltaSuite.scala
similarity index 94%
rename from
gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxTPCHDeltaSuite.scala
rename to
backends-velox/src/test-delta/scala/org/apache/gluten/execution/VeloxTPCHDeltaSuite.scala
index dff1746664..238f5ca56f 100644
---
a/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxTPCHDeltaSuite.scala
+++
b/backends-velox/src/test-delta/scala/org/apache/gluten/execution/VeloxTPCHDeltaSuite.scala
@@ -21,9 +21,8 @@ import org.apache.spark.SparkConf
import java.io.File
class VeloxTPCHDeltaSuite 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
diff --git a/gluten-delta/pom.xml b/gluten-delta/pom.xml
index 6a6b7291d7..f971ec6070 100755
--- a/gluten-delta/pom.xml
+++ b/gluten-delta/pom.xml
@@ -49,19 +49,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-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
b/gluten-delta/src/test/scala/org/apache/gluten/execution/DeltaSuite.scala
similarity index 98%
rename from
gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
rename to
gluten-delta/src/test/scala/org/apache/gluten/execution/DeltaSuite.scala
index 9b2f193422..caf86189a2 100644
---
a/gluten-delta/src/test/scala/org/apache/gluten/execution/VeloxDeltaSuite.scala
+++ b/gluten-delta/src/test/scala/org/apache/gluten/execution/DeltaSuite.scala
@@ -22,9 +22,10 @@ import org.apache.spark.sql.types.{ArrayType, IntegerType,
MapType, StringType,
import scala.collection.JavaConverters._
-class VeloxDeltaSuite extends WholeStageTransformerSuite {
-
+abstract class DeltaSuite extends WholeStageTransformerSuite {
protected val rootPath: String = getClass.getResource("/").getPath
+ // FIXME: This folder doesn't exist in module gluten-delta so should be
provided by
+ // backend modules that rely on this suite.
override protected val resourcePath: String = "/tpch-data-parquet"
override protected val fileFormat: String = "parquet"
diff --git
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
b/gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
index f5bf24d1b6..cb630a1475 100644
---
a/gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
+++
b/gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala
@@ -23,8 +23,8 @@ import org.apache.spark.sql.Row
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.
+ // FIXME: This folder doesn't exist in module gluten-iceberg so should be
provided by
+ // backend modules that rely on this suite.
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]