vinodkc opened a new pull request, #60370:
URL: https://github.com/apache/spark/pull/60370

   ### What changes were proposed in this pull request?
   
   Use `latestOffset()` without arguments in the two stream reader tests that 
the branch-4.1 backport of #60315 (5a18201cc9c) added, instead of the 
master-only `latestOffset(start, ReadAllAvailable())` calls.
   
   This mirrors #59948, which fixed the same problem for the tests added by the 
branch-4.1 backport of #59855.
   
   ### Why are the changes needed?
   
   The branch-4.1 backport of #60315 copied test calls to a newer API, 
including the undefined `ReadAllAvailable`, exactly like the #59855 backport 
did. On branch-4.1:
   
   - `ReadAllAvailable` does not exist in `pyspark.sql.datasource` (it ships 
with the newer `latestOffset(start, readLimit)` API on master).
   - `_SimpleStreamReaderWrapper.latestOffset()` takes no arguments.
   
   CI on the backport commit 5a18201cc9c already fails the Python linter job 
with nine instances of:
   
   ```
   ./python/pyspark/sql/tests/test_python_streaming_datasource.py:424:47: F405 
'ReadAllAvailable' may be undefined, or defined from star imports: 
pyspark.sql.tests.test_python_streaming_datasource
   ```
   
   and the two tests fail at runtime with `NameError: name 'ReadAllAvailable' 
is not defined` (the pyspark-sql test job was still in progress at the time of 
this PR, but the failure follows from the same undefined name).
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Test-only change; no production code is touched.
   
   ### How was this patch tested?
   
   Ran the three `_SimpleStreamReaderWrapper` tests 
(`test_simple_stream_reader_returns_list`, 
`test_simple_stream_reader_returns_non_iterator_iterables`, 
`test_simple_stream_reader_next_lookup_uses_type`) against the branch-4.1 
Python sources with this patch; all pass, and flake8 is clean with the 
repository configuration. The full JVM suite was not run (test-only change).
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to