Skip to content

Commit

Permalink
Align the timezone of decimal partition value with Velox
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-mo committed Nov 21, 2024
1 parent d5e5544 commit 686446e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import org.apache.spark.util.{ExecutorManager, SparkDirectoryUtil}

import java.lang.{Long => JLong}
import java.nio.charset.StandardCharsets
import java.time.ZoneOffset
import java.time.ZoneId
import java.util.{ArrayList => JArrayList, HashMap => JHashMap, Map => JMap, UUID}

import scala.collection.JavaConverters._
Expand Down Expand Up @@ -151,8 +151,9 @@ class VeloxIteratorApi extends IteratorApi with Logging {
case _: DecimalType =>
pn.asInstanceOf[Decimal].toJavaBigInteger.toString
case _: TimestampType =>
// Velox uses 'America/Los_Angeles' timezone by default.
TimestampFormatter
.getFractionFormatter(ZoneOffset.UTC)
.getFractionFormatter(ZoneId.of("America/Los_Angeles"))
.format(pn.asInstanceOf[java.lang.Long])
case _ => pn.toString
}
Expand Down
4 changes: 2 additions & 2 deletions ep/build-velox/src/get_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

set -exu

VELOX_REPO=https://github.com/oap-project/velox.git
VELOX_BRANCH=2024_11_20
VELOX_REPO=https://github.com/rui-mo/velox.git
VELOX_BRANCH=test_tz
VELOX_HOME=""

OS=`uname -s`
Expand Down

0 comments on commit 686446e

Please sign in to comment.