You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix selectSparkVersion() to use contains() instead of equals() (#504)
## What changes are proposed in this pull request?
This PR fixes a bug in the `selectSparkVersion()` method in
`ClustersExt.java` where spark version matching doesn't work with real
Databricks Runtime version names.
The current `equals()` implementation fails because real Databricks
Runtime version names contain additional information. For example, the
actual version name is `"13.3 LTS (includes Apache Spark 3.4.1, Scala
2.12)"`, not just `"Apache Spark 3.4.1"`. Both the Go SDK
(`strings.Contains()`) and Python SDK (`in` operator) use substring
matching for this functionality.
Originally reported in PR #229 with real API response data.
## How is this tested?
Added a focused unit test `sparkVersionWithSparkVersionParameter()` that
demonstrates the fix works with realistic API response data. The test
uses a version name in the actual format returned by the Databricks API:
`"13.3 LTS (includes Apache Spark 3.4.1, Scala 2.12)"`.
Fixes#229
---------
Co-authored-by: Claude <[email protected]>
0 commit comments