Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>io.prestosql.hive</groupId>
<artifactId>hive-apache</artifactId>
<version>3.0.0-7-SNAPSHOT</version>
<version>3.1.2-1-SNAPSHOT</version>

<name>hive-apache</name>
<description>Shaded version of Apache Hive for Presto</description>
Expand Down Expand Up @@ -43,13 +43,12 @@

<shadeBase>io.prestosql.hive.\$internal</shadeBase>

<dep.hive.version>3.0.0</dep.hive.version>
<dep.hive.version>3.1.2</dep.hive.version>

<dep.avro.version>1.8.2</dep.avro.version>
<dep.jodd.version>3.5.2</dep.jodd.version>
<dep.parquet.version>1.11.0</dep.parquet.version>
<dep.protobuf.version>2.5.0</dep.protobuf.version>
<dep.slf4j.version>1.7.25</dep.slf4j.version>
<dep.slf4j.version>1.7.29</dep.slf4j.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -287,10 +286,6 @@
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
</exclusion>
<exclusion>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down Expand Up @@ -533,12 +528,6 @@
<version>${dep.protobuf.version}</version>
</dependency>

<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-core</artifactId>
<version>${dep.jodd.version}</version>
</dependency>

<!-- hadoop compilation dependency for CodecPool -->
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down Expand Up @@ -677,10 +666,6 @@
<pattern>org.tukaani.xz</pattern>
<shadedPattern>${shadeBase}.org.tukaani.xz</shadedPattern>
</relocation>
<relocation>
<pattern>jodd</pattern>
<shadedPattern>${shadeBase}.jodd</shadedPattern>
</relocation>
<relocation>
<pattern>com.codahale.metrics</pattern>
<shadedPattern>${shadeBase}.com.codahale.metrics</shadedPattern>
Expand Down Expand Up @@ -725,6 +710,7 @@
<exclude>hive-exec-log4j2.properties</exclude>
<exclude>tez-container-log4j2.properties</exclude>
<exclude>org/apache/hadoop/hive/ql/io/CodecPool*.class</exclude>
<exclude>org/apache/hadoop/hive/ql/io/parquet/timestamp/NanoTimeUtils.class</exclude>
<exclude>org/apache/tez/**</exclude>
</excludes>
</filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.apache.hadoop.hive.ql.io.parquet.timestamp;

import org.apache.hadoop.hive.common.type.Timestamp;

import static java.lang.Math.toIntExact;
import static java.util.concurrent.TimeUnit.SECONDS;

public final class NanoTimeUtils
{
private NanoTimeUtils() {}

private static final int JULIAN_EPOCH_OFFSET_DAYS = 2_440_588;

public static NanoTime getNanoTime(Timestamp timestamp, @SuppressWarnings("unused") boolean ignored)
{
int epochDay = toIntExact(SECONDS.toDays(timestamp.toEpochSecond()));
int julianDay = JULIAN_EPOCH_OFFSET_DAYS + epochDay;

long timeOfDaySeconds = timestamp.toEpochSecond() % 86400;
long timeOfDayNanos = SECONDS.toNanos(timeOfDaySeconds) + timestamp.getNanos();

return new NanoTime(julianDay, timeOfDayNanos);
}
}
22 changes: 0 additions & 22 deletions src/main/java/org/apache/hadoop/hive/serde2/SerDe.java

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/java/org/apache/hive/hcatalog/data/JsonSerDe.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.charset.CharacterCodingException;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -34,9 +32,11 @@
import java.util.regex.Pattern;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.common.type.Date;
import org.apache.hadoop.hive.common.type.HiveChar;
import org.apache.hadoop.hive.common.type.HiveDecimal;
import org.apache.hadoop.hive.common.type.HiveVarchar;
import org.apache.hadoop.hive.common.type.Timestamp;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.hive.serde2.AbstractSerDe;
Expand Down