Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading to PySpark 4.0.0 is a significant change. Apache Spark 4.0 now uses Scala 2.13 by default, whereas Spark 3.x versions (like 3.5.5) primarily used Scala 2.12.
This raises a critical concern about the compatibility of the Pub/Sub Lite Spark connector JARs used in your examples and tests (
spark_streaming_test.py):gs://pubsublite-spark/pubsublite-spark-sql-streaming-1.0.0-with-dependencies.jargs://spark-lib/pubsublite/pubsublite-spark-sql-streaming-LATEST-with-dependencies.jarThese JARs, especially version
1.0.0, are likely compiled against Scala 2.12. For instance, thejava-pubsublite-sparkconnector version1.1.0(released Feb 2024) specifies Spark 3.3.2 and Scala 2.12.Could you please verify the following points?
spark_streaming_test.pybeen updated to use these compatible JARs if necessary?spark_streaming_test.pybeen executed successfully with PySpark 4.0 and the (potentially new) connector JARs? Without compatible connectors, these tests are very likely to fail due to binary incompatibilities between Scala versions.Additionally, PySpark 4.0 may introduce other breaking changes or behavior modifications (e.g., the default change for
spark.sql.legacy.respectNullabilityInTextDatasetConversion). It's important to review the Apache Spark 4.0.0 release notes for any other changes that might affect your examples and ensure they behave as expected.