vinodkc commented on code in PR #53026:
URL: https://github.com/apache/spark/pull/53026#discussion_r2524209112
##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectResultSet.scala:
##########
@@ -501,28 +516,22 @@ class SparkConnectResultSet(
throw new SQLFeatureNotSupportedException
override def getDate(columnIndex: Int, cal: Calendar): Date = {
- val date = getDate(columnIndex)
- if (date == null || cal == null) {
- return date
- }
-
- val targetCalendar = cal.clone().asInstanceOf[Calendar]
- targetCalendar.setTime(date)
- targetCalendar.set(Calendar.HOUR_OF_DAY, 0)
- targetCalendar.set(Calendar.MINUTE, 0)
- targetCalendar.set(Calendar.SECOND, 0)
- targetCalendar.set(Calendar.MILLISECOND, 0)
- new Date(targetCalendar.getTimeInMillis)
+ // The Calendar parameter in JDBC methods is meant for timezone-aware
types,
Review Comment:
Thanks for the comment, added method comments
--
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]