vinodkc commented on code in PR #53026:
URL: https://github.com/apache/spark/pull/53026#discussion_r2524203623


##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectResultSet.scala:
##########
@@ -147,8 +148,22 @@ class SparkConnectResultSet(
     getColumnValue(columnIndex, null: Date) { idx => currentRow.getDate(idx) }
   }
 
-  override def getTime(columnIndex: Int): Time =
-    throw new SQLFeatureNotSupportedException
+  override def getTime(columnIndex: Int): Time = {
+    getColumnValue(columnIndex, null: Time) { idx =>
+      val localTime = currentRow.get(idx).asInstanceOf[LocalTime]
+      // Convert LocalTime to milliseconds since midnight to preserve 
fractional seconds.
+      // Note: java.sql.Time can only store up to millisecond precision (3 
digits).
+      // For TIME types with higher precision (TIME(4-9)), 
microseconds/nanoseconds are truncated.
+      // If user needs full precision,
+      // should use: getObject(columnIndex, classOf[java.time.LocalTime])
+      val millisSinceMidnight =

Review Comment:
   Yes, Done



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