uros-b commented on code in PR #56622:
URL: https://github.com/apache/spark/pull/56622#discussion_r3447564860


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/SparkDateTimeUtils.scala:
##########


Review Comment:
   Minor performance note here, regarding per-value math.pow in the vectorized 
hot loop. TimeUpdater.toTruncatedNanos → truncateTimeToPrecision recomputes 
math.pow(10, scale).toLong (a float pow) plus an assert for every decoded 
value. The precision is constant per column, so the factor (and the assert) are 
invariant. In the vectorized reader — which exists precisely for throughput — 
this adds avoidable cost per value. Worth precomputing factor once in the 
TimeUpdater constructor (the row converter is less hot but could do the same).



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