Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Jun 12, 2024
1 parent 7dd4224 commit 2d3f165
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@
package org.apache.comet

import java.time.{Duration, Period}

import scala.reflect.ClassTag
import scala.reflect.runtime.universe.TypeTag

import org.apache.hadoop.fs.Path
import org.apache.spark.sql.{CometTestBase, DataFrame, Row}
import org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanHelper
import org.apache.spark.sql.functions.expr
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.internal.SQLConf.SESSION_LOCAL_TIMEZONE
import org.apache.spark.sql.types.{Decimal, DecimalType}

import org.apache.comet.CometSparkSessionExtensions.{isSpark32, isSpark33Plus, isSpark34Plus}

import java.sql.Timestamp

class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
import testImplicits._

Expand Down Expand Up @@ -229,9 +228,10 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
case None =>
Row(null, null, null)
case Some(i) =>
val hour = new java.sql.Timestamp(i).toLocalDateTime.getHour
val minute = new java.sql.Timestamp(i).toLocalDateTime.getMinute
val second = new java.sql.Timestamp(i).toLocalDateTime.getSecond
val timestamp = new Timestamp(i).toLocalDateTime
val hour = timestamp.getHour
val minute = timestamp.getMinute
val second = timestamp.getSecond

Row(hour, minute, second)
})
Expand Down

0 comments on commit 2d3f165

Please sign in to comment.