linhongliu-db opened a new pull request, #59817:
URL: https://github.com/apache/spark/pull/59817

   ### What changes were proposed in this pull request?
   
   Read day-time interval values directly as microseconds and convert them with 
SparkIntervalUtils.microsToDuration.
   
   ### Why are the changes needed?
   
   Arrow's DurationVector.getObject converts microseconds through a signed 
64-bit nanosecond count. That intermediate value saturates for valid large 
Spark intervals. For example, 10000000000000000 microseconds decodes as 
approximately 9223372036854775 microseconds.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, a bug fix. The Spark Connect JVM client retains the full day-time 
interval range when decoding Arrow results. The wire representation is 
unchanged.
   
   ### How was this patch tested?
   
   Added six regression cases covering Long.MinValue, Long.MaxValue, -1, 0, 1 
and a large positive microsecond count, each with NULL and interval-to-string 
decoding. Three large-range cases fail on unchanged Apache code. On JDK 17, all 
125 ArrowEncoderSuite tests passed; the six regression cases passed again after 
formatting. Connect common/client Scalastyle and Scalafmt checks, plus git diff 
--check, passed.
   
   ```bash
   build/sbt 'connect-client-jvm/testOnly 
org.apache.spark.sql.connect.client.arrow.ArrowEncoderSuite'
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-6)
   


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