diff --git a/ci/docker/conda-python-spark.dockerfile b/ci/docker/conda-python-spark.dockerfile index 8267c690474..f1a8662ac99 100644 --- a/ci/docker/conda-python-spark.dockerfile +++ b/ci/docker/conda-python-spark.dockerfile @@ -21,19 +21,21 @@ ARG arch_short ARG python=3.11 FROM --platform=linux/${arch} ${repo}:${arch_short}-conda-python-${python} -ARG jdk=17 +ARG jdk=21 ARG maven=3.9.9 ARG numpy=latest -COPY ci/scripts/install_numpy.sh /arrow/ci/scripts/ +# Spark master requires pandas<3, remove pin and use latest once resolved: +# https://github.com/apache/spark/issues/59824 +ARG pandas=2.* +COPY ci/scripts/install_pandas.sh /arrow/ci/scripts/ RUN mamba install -q -y \ openjdk=${jdk} \ - maven=${maven} \ - pandas && \ + maven=${maven} && \ mamba clean --all --yes && \ mamba uninstall -q -y numpy && \ - /arrow/ci/scripts/install_numpy.sh ${numpy} + /arrow/ci/scripts/install_pandas.sh ${pandas} ${numpy} # installing specific version of spark ARG spark=master diff --git a/ci/scripts/integration_spark.sh b/ci/scripts/integration_spark.sh index b6b45a796ab..2c375e401e0 100755 --- a/ci/scripts/integration_spark.sh +++ b/ci/scripts/integration_spark.sh @@ -42,7 +42,7 @@ pushd "${spark_dir}" echo "Building Spark ${spark_version}" # Build Spark only - build/mvn -B -DskipTests package + build/mvn -B -DskipTests -Phive package # Run pyarrow related Python tests only # "pyspark.sql.tests.arrow.test_arrow_grouped_map" and @@ -50,7 +50,10 @@ pushd "${spark_dir}" # See: https://github.com/apache/arrow/issues/44986 spark_python_tests=( "pyspark.sql.tests.arrow.test_arrow" - "pyspark.sql.tests.arrow.test_arrow_map" + # Skip test_arrow_map for now due to known issues with PyArrow API changes. + # Remove skip once Spark fixes: + # https://issues.apache.org/jira/browse/SPARK-62139 + #"pyspark.sql.tests.arrow.test_arrow_map" "pyspark.sql.tests.arrow.test_arrow_python_udf") case "${spark_version}" in diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index fc9b66ab384..d5069bcfe06 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -784,7 +784,7 @@ tasks: image: conda-python-hdfs {% endfor %} -{% for python_version, spark_version, test_pyarrow_only, numpy_version, jdk_version in [("3.11", "master", "false", "latest", "17")] %} +{% for python_version, spark_version, test_pyarrow_only, numpy_version, jdk_version in [("3.11", "master", "false", "latest", "21")] %} test-conda-python-{{ python_version }}-spark-{{ spark_version }}: ci: github template: docker-tests/github.linux.yml @@ -796,7 +796,7 @@ tasks: NUMPY: "{{ numpy_version }}" JDK: "{{ jdk_version }}" fetch_depth: 0 - # use the branch-3.0 of spark, so prevent reusing any layers + # Fetch the latest Spark master instead of reusing a cached checkout flags: --no-leaf-cache image: conda-python-spark timeout: 90