vinodkc commented on code in PR #50558:
URL: https://github.com/apache/spark/pull/50558#discussion_r2051097898


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:
##########
@@ -297,6 +312,36 @@ object HourExpressionBuilder extends ExpressionBuilder {
   }
 }
 
+case class SecondsOfTimeWithFraction(child: Expression)
+    extends RuntimeReplaceable
+    with ExpectsInputTypes {
+
+  override def replacement: Expression = {
+
+    StaticInvoke(
+      classOf[DateTimeUtils.type],
+      DecimalType(8, 6),
+      "getSecondsOfTimeWithFraction",
+      Seq(child, Literal(precision)),
+      Seq(child.dataType, IntegerType))
+  }
+  private val precision: Int = child.dataType match {
+    case t: TimeType => t.precision
+    case _ => TimeType.MAX_PRECISION

Review Comment:
   Only TimeType is expected. I updated the code



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to