Add Databricks-17.3 support [databricks]#14360
Conversation
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
- Share TryModeShim.scala (evalContext.evalMode handling) - Share TimeAddShims.scala (TimeAdd->TimestampAddInterval rename) - Both files moved to spark400db173 with updated metadata to support both versions
- Add spark400db173 to RoundShims and SparkStringUtilsShims metadata - Fix ShowNamespacesExecShims API mismatch - Share AggregateInPandasExecShims between spark400db173 and spark411 - Share FileStreamSinkShims between spark400db173 and spark411 Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Refactor getReader to getReaderImpl and use ShuffleManagerShims to handle version-specific shuffle reader signatures. Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
…_173_support_backup
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
|
build |
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
|
build |
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
…ids into databricks_173_support
|
build |
|
build |
sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuMultiFileReader.scala
Show resolved
Hide resolved
...gin/src/main/spark400db173/scala/com/nvidia/spark/rapids/shims/QueryStageRowCountShims.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
|
build |
jenkins/databricks/deploy.sh
Outdated
| SERVER_ID='snapshots' | ||
| SERVER_URL="$URM_URL-local" | ||
| SCALA_VERSION=`mvn help:evaluate -q -pl dist -Dexpression=scala.binary.version -DforceStdout` | ||
| SCALA_VERSION=`mvn help:evaluate -q -f $POM_FILE -pl dist -Dexpression=scala.binary.version -DforceStdout` |
There was a problem hiding this comment.
Define a standard way of detecting versions and source this across scripts . Why is this different from build.sh? Can we get it from some build info file in the DBR image ?
There was a problem hiding this comment.
Updated it similar to build.sh. I couldn't figure out this from any files in the DBR image.
jenkins/databricks/install_deps.py
Outdated
| # Spark 3.x versions | ||
| deps += [Artifact('org.apache.hive', 'hive-metastore-client-patched', | ||
| f'{spark_prefix}--patched-hive-with-glue--hive-*-patch-{spark_suffix}_deploy.jar')] |
There was a problem hiding this comment.
Make the indentation consistent at least in the code you are adding
|
|
||
| /** | ||
| * Databricks 17.3 version where getRuntimeStatistics has compile-time access restrictions. | ||
| * The method exists and is public at runtime, but compile-time metadata shows it as protected, |
There was a problem hiding this comment.
Sounds like Scala protected compiles to JVM public. Can we not then make it a Java class and avoid reflection?
There was a problem hiding this comment.
Thanks for the pointer. Updated it.
| def repartition(numPartitions: Int, updatedRepartitioningStatus: AdaptiveRepartitioningStatus): | ||
| ShuffleExchangeLike = { | ||
| val newCpuPartitioning = cpuOutputPartitioning.withNewNumPartitions(numPartitions) | ||
| copy(gpuOutputPartitioning, child, shuffleOrigin)(newCpuPartitioning) |
There was a problem hiding this comment.
Do we need to pass updatedRepartitioningStatus around here somewhere?
There was a problem hiding this comment.
Updated it to pass updatedReparitiongStatus. Earlier it was always the default value.
| // Databricks 17.3: Use jackson.Serialization instead of JsonMethods | ||
| import org.json4s.jackson.Serialization |
There was a problem hiding this comment.
Can we shim just this aspect instead of copy-and-pasting 650 lines ?
There was a problem hiding this comment.
Added shim for this. I missed it earlier since it is in tests module. Initially I had updated to make it to compile but later forgot to shim it.
| {"spark": "358"} | ||
| {"spark": "400"} | ||
| {"spark": "401"} | ||
| {"spark": "402"} |
There was a problem hiding this comment.
Getting lost in the tags. Which StreamingShims will cover 410,411?
There was a problem hiding this comment.
This is a dead code at this point. This is handled in FileStreamSinkShims - 411/FileStreamSinkShims
Added 400db173 shim to this.
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
copy function Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
|
build |
| # and Databricks 15.4 are both based on spark version 3.5.0 | ||
| BUILDVER="$BUILDVER$DBR_VER" | ||
| SPARK_VERSION_TO_INSTALL_DATABRICKS_JARS="$SPARK_VERSION_TO_INSTALL_DATABRICKS_JARS-$DBR_VER" | ||
| elif [ $DBR_VER == '17.3' ]; then |
There was a problem hiding this comment.
NIT: better to merge 14.3 and 17.3 together like if [ $DBR_VER == '14.3' ] || [ $DBR_VER == '17.3' ]; then ...
| SCALA_VERSION=`mvn help:evaluate -q -pl dist -Dexpression=scala.binary.version -DforceStdout` | ||
| # Determine Scala version from Spark version: Spark 4.x uses Scala 2.13, earlier uses 2.12 | ||
| if [[ "$BASE_SPARK_VERSION_TO_INSTALL_DATABRICKS_JARS" == 4.* ]]; then | ||
| SCALA_VERSION="2.13" |
There was a problem hiding this comment.
We should also define POM_FILE here for deploy.sh like what [jenkins/databricks/build.sh] does
Contributes to #14015
Description
This PR adds support for Databricks-17.3. This PR compiles DBR-17.3 without any build failures. We have a bunch of integration tests that are failing that are tracked in a different issue.
This PR:
spark400db173shim to support Databricks Runtime 17.3, which is based on Spark 4.0.0Key Changes
Build Infrastructure
release400db173withspark.version=4.0.0-databricks-173dbsuffix)orc-formatdependency conditional (DB-17.3 only) in the Databricks BOM — this artifact does not exist in earlier Databricks runtimesbuild.sh,deploy.sh,install_deps.py,common_vars.sh) for DB-17.3 cluster supportShuffle API Changes
prismMapStatusEnabledparameter toShuffleManager.getReader()(8-param vs 7-param signature)GpuShuffleExchangeExecfor DB-17.3 with additional metrics (skew, spill-fallback, adaptive repartitioning) and newrepartition()/adaptiveRepartitioningStatus()methodsRapidsShuffleReaderShim, andShuffleManagerShimsfor the updated shuffle interfacesAdaptive Query Execution
ShuffleQueryStageExecandBroadcastQueryStageExecconstructors now require an implicitadaptiveContextparameter in DB-17.3Expression and Subquery Changes
DynamicPruningExpressionhas a second parameter (dynamicPruningInfo) in DB-17.3GpuScalarSubquerymust implementresultUpdated()added toExecSubqueryExpressionnodePatternsInternaltree pattern matching (ShimGetArrayStructFields,ShimGetArrayItem,ShimGetStructField,GpuDeterministicFirstLastCollectShim)Streaming and Package Reorganization
FileStreamSinkmoved toorg.apache.spark.sql.execution.streaming.sinksMetadataLogFileIndexmoved toorg.apache.spark.sql.execution.streaming.runtimeBuild
Checklists
(Please explain in the PR description how the new code paths are tested, such as names of the new/existing tests that cover them.)