Skip to content

Commit 894b0aa

Browse files
committed
Fix Partition Value String Generation for Timestamp Column
1 parent 68fbe02 commit 894b0aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

presto-hive-metastore/src/main/java/com/facebook/presto/hive/metastore/MetastoreUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
import org.apache.hadoop.hive.common.FileUtils;
7676
import org.apache.hadoop.hive.common.type.Date;
7777
import org.apache.hadoop.hive.common.type.HiveDecimal;
78-
import org.apache.hadoop.hive.common.type.Timestamp;
7978
import org.apache.hadoop.hive.metastore.ProtectMode;
8079
import org.apache.hadoop.io.Text;
8180
import org.joda.time.DateTimeZone;
@@ -86,6 +85,7 @@
8685

8786
import java.io.IOException;
8887
import java.math.BigInteger;
88+
import java.sql.Timestamp;
8989
import java.util.ArrayList;
9090
import java.util.Collection;
9191
import java.util.Collections;
@@ -682,7 +682,7 @@ public static Object getField(Type type, Block block, int position)
682682
}
683683
if (TimestampType.TIMESTAMP.equals(type)) {
684684
long millisUtc = type.getLong(block, position);
685-
return Timestamp.ofEpochMilli(millisUtc);
685+
return new Timestamp(millisUtc);
686686
}
687687
if (type instanceof DecimalType) {
688688
DecimalType decimalType = (DecimalType) type;

0 commit comments

Comments
 (0)