Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Spark dependency from 3.1.2 to 3.2.0 #460

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ create_docs_env: &create_docs_env
fi

install_pyspark2: &install_pyspark2
run: # Evict PySpark 3.1.2 in favor of PySpark 2.4.5
run: # Evict PySpark 3.2.0 in favor of PySpark 2.4.5
name: Install PySpark 2.4.5
command: |
export PATH=$HOME/conda/bin:$PATH
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
environment:
command: |
export PATH=$HOME/conda/envs/glow/bin:$PATH
export SPARK_VERSION="3.1.2"
export SPARK_VERSION="3.2.0"
export SCALA_VERSION="2.12.8"
sbt core/test exit
- run:
Expand All @@ -235,7 +235,7 @@ jobs:
environment:
command: |
export PATH=$HOME/conda/envs/glow/bin:$PATH
export SPARK_VERSION="3.1.2"
export SPARK_VERSION="3.2.0"
export SCALA_VERSION="2.12.8"
sbt docs/test exit
- run:
Expand All @@ -244,15 +244,15 @@ jobs:
environment:
command: |
export PATH=$HOME/conda/envs/glow/bin:$PATH
export SPARK_VERSION="3.1.2"
export SPARK_VERSION="3.2.0"
export SCALA_VERSION="2.12.8"
sbt python/test exit
- run:
name: Run Hail tests
environment:
command: |
export PATH=$HOME/conda/envs/glow/bin:$HOME/conda/bin:$PATH
export SPARK_VERSION="3.1.2"
export SPARK_VERSION="3.2.0"
export SCALA_VERSION="2.12.8"
export HAIL_VERSION="0.2.74"
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ conda env update -f python/environment.yml

Start an sbt shell using the `sbt` command.

> **FYI**: The following SBT projects are built on Spark 3.1.2/Scala 2.12.8 by default. To change the Spark version and
> **FYI**: The following SBT projects are built on Spark 3.2.0/Scala 2.12.8 by default. To change the Spark version and
Scala version, set the environment variables `SPARK_VERSION` and `SCALA_VERSION`.

To compile the main code:
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import sbt.nio.Keys._
lazy val scala212 = "2.12.8"
lazy val scala211 = "2.11.12"

lazy val spark3 = "3.1.2"
lazy val spark3 = "3.2.0"
lazy val spark2 = "2.4.5"

lazy val hailOnSpark3 = "0.2.74"
lazy val hailOnSpark3 = "0.2.78"
lazy val hailOnSpark2 = "0.2.58"

lazy val sparkVersion = settingKey[String]("sparkVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ trait AggregateByIndex extends DeclarativeAggregate with HigherOrderFunction {
*/
trait UnwrappedAggregateFunction extends AggregateFunction {
def asWrapped: AggregateFunction
override protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]): Expression =
super.legacyWithNewChildren(newChildren)
}

case class UnwrappedAggregateByIndex(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import org.apache.spark.sql.types._
case class ExpandStruct(struct: Expression) extends Expression with Unevaluable {
override def children: Seq[Expression] = Seq(struct)
override lazy val resolved: Boolean = false
override def dataType: DataType = throw new UnresolvedException(this, "dataType")
override def nullable: Boolean = throw new UnresolvedException(this, "nullable")
override def dataType: DataType = throw new UnresolvedException("dataType")
override def nullable: Boolean = throw new UnresolvedException("nullable")
def expand(): Seq[NamedExpression] = {
if (!struct.dataType.isInstanceOf[StructType]) {
throw SQLUtils.newAnalysisException("Only structs can be expanded.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ trait ExpectsGenotypeFields extends Expression {
trait Rewrite extends Expression with Unevaluable {
def rewrite: Expression

override def dataType: DataType = throw new UnresolvedException(this, "dataType")
override def nullable: Boolean = throw new UnresolvedException(this, "nullable")
override def dataType: DataType = throw new UnresolvedException("dataType")
override def nullable: Boolean = throw new UnresolvedException("nullable")
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package io.projectglow
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.ExpressionInfo

// Spark 3.1 APIs that are not inter-version compatible
// Spark 3.2 APIs that are not inter-version compatible
object SparkShim extends SparkShimBase {
// [SPARK-25393][SQL] Adding new function from_csv()
// Refactors classes from [[org.apache.spark.sql.execution.datasources.csv]] to [[org.apache.spark.sql.catalyst.csv]]
Expand Down
4 changes: 2 additions & 2 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Getting Started
Running Locally
---------------

Glow requires Apache Spark 3.1.2.
Glow requires Apache Spark 3.2.0.

.. tabs::

Expand All @@ -14,7 +14,7 @@ Glow requires Apache Spark 3.1.2.

.. code-block:: sh

pip install pyspark==3.1.2
pip install pyspark==3.2.0

or `download a specific distribution <https://spark.apache.org/downloads.html>`_.

Expand Down
2 changes: 1 addition & 1 deletion python/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- pandas=1.0.1
- pip
- pyarrow=1.0.1
- pyspark=3.1.2
- pyspark=3.2.0
- pytest
- pyyaml
- scipy=1.4.1
Expand Down