MaxGekk commented on code in PR #56449:
URL: https://github.com/apache/spark/pull/56449#discussion_r3412611314


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ToStringBase.scala:
##########
@@ -242,7 +242,10 @@ trait ToStringBase { self: UnaryExpression with 
TimeZoneAwareExpression =>
         // Route nanosecond timestamp cast-to-string through the Types 
Framework: emit a runtime
         // call into the ops reference object. The cast's session zone is 
threaded into the lookup
         // so LTZ carries it; NTZ is zone-independent (SPARK-57285).
-        val ops = TypeApiOps(from, zoneId).get
+        // Resolve the zone here so the reference object holds a ZoneId, not a 
closure capturing
+        // this Cast - a parse of the cast's resolved zone, not a 
session-config read.

Review Comment:
   Awkward phrasing — "a parse of the cast's resolved zone" reads as a broken 
noun phrase (the zone is already resolved).
   ```suggestion
           // this Cast; the held value is the cast's resolved zone, not a 
session-config read.
   ```



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