Skip to content

Commit

Permalink
[GLUTEN-7912][VL] Flip dependency direction for gluten-delta (#8218)
Browse files Browse the repository at this point in the history
Closes #7912
  • Loading branch information
zhztheplayer authored Dec 12, 2024
1 parent 65f4ad1 commit be5508b
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 20 deletions.
59 changes: 59 additions & 0 deletions backends-velox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions gluten-delta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit be5508b

Please sign in to comment.