uros-db commented on code in PR #56205:
URL: https://github.com/apache/spark/pull/56205#discussion_r3334785849


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/SparkDateTimeUtils.scala:
##########
@@ -789,6 +817,117 @@ trait SparkDateTimeUtils {
     }
   }
 
+  /**
+   * Trims and parses a given UTF8 string into a [[TimestampNanosVal]] (epoch 
microseconds plus a
+   * sub-microsecond remainder in [0, 999]) for `TIMESTAMP_LTZ(precision)` 
with `precision` in [7,
+   * 9]. Fractional digits beyond `precision` are truncated. The return type 
is [[Option]] in
+   * order to distinguish between a valid zero value and null. Please refer to
+   * `parseTimestampString` for the allowed formats.
+   */
+  def stringToTimestampLTZNanos(

Review Comment:
   Duplication with the micro paths: `stringToTimestampLTZNanos` / 
`stringToTimestampNTZNanos` are near-clones of stringToTimestamp / 
stringToTimestampWithoutTimeZone, differing only in the nanoOfSecond term and 
the final converter. Not a blocker, but a shared private helper taking the 
"extra nanos" and a segments → value function would remove the copy and keep 
the two families from drifting (e.g. if the justTime/zone-handling logic ever 
changes).



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