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

   ### What changes were proposed in this pull request?
   
   Add dedicated PySpark test coverage for the TIME data type, mirroring the 
Scala `TimeFunctionsSuiteBase`:
   
   - TIME function tests: `make_time`, `hour`, `minute`, `second`, `to_time`, 
`try_to_time`, `time_diff`, `time_trunc`, `current_time`, 
`time_from_seconds/millis/micros`, `time_to_seconds/millis/micros`
   - `createDataFrame` / `collect` round-trip with `datetime.time` values 
(including NULL handling)
   - Arrow-based `toPandas` / `createDataFrame` round-trip for TIME data values
   - Schema inference for `datetime.time`
   - Multi-row DataFrame operations and filtering
   - NULL propagation for all TIME functions
   - `selectExpr` vs `select` parity assertions
   - Spark Connect parity test
   
   ### Why are the changes needed?
   
   TIME appears only in scattered cases across PySpark tests (`test_types.py`, 
`test_creation.py`, `test_functions.py`). There is no dedicated TIME functions 
/ round-trip suite. The Scala `TimeFunctionsSuiteBase` has 16 thorough tests; 
the PySpark equivalents were minimal smoke tests missing NULL handling, error 
cases, multi-row coverage, and the newer 4.2.0 functions (`time_from_seconds`, 
`time_to_millis`, etc.).
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Test-only changes.
   
   ### How was this patch tested?
   
   - New test file `python/pyspark/sql/tests/test_time_functions.py` with 20+ 
test methods
   - Spark Connect parity test at 
`python/pyspark/sql/tests/connect/test_parity_time_functions.py`
   - Both registered in `dev/sparktestsupport/modules.py`
   - All tests pass locally: `python/run-tests --testnames 
pyspark.sql.tests.test_time_functions`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generative AI tooling (Claude Code) was used as an assistive tool for 
implementation guidance.


-- 
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