cloud-fan commented on code in PR #53370:
URL: https://github.com/apache/spark/pull/53370#discussion_r2601239372


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:
##########
@@ -1029,7 +1085,14 @@ case class TimeToMillis(child: Expression)
 case class TimeToMicros(child: Expression)
   extends TimeToLongBase {
 
-  override def scaleFactor: Long = NANOS_PER_MICROS
+  override def nullSafeEval(input: Any): Any = {
+    DateTimeUtils.timeToMicros(input.asInstanceOf[Number].longValue())
+  }
+
+  override protected def doGenCode(ctx: CodegenContext, ev: ExprCode): 
ExprCode = {

Review Comment:
   it's not unified, can you follow `MakeTimestampNTZ` exactly?



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