orc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [4/4] orc git commit: ORC-194. Split TreeWriters out of WriterImpl.
Date Fri, 16 Jun 2017 18:30:01 GMT
ORC-194. Split TreeWriters out of WriterImpl.

Signed-off-by: Owen O'Malley <omalley@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/orc/repo
Commit: http://git-wip-us.apache.org/repos/asf/orc/commit/ded204a4
Tree: http://git-wip-us.apache.org/repos/asf/orc/tree/ded204a4
Diff: http://git-wip-us.apache.org/repos/asf/orc/diff/ded204a4

Branch: refs/heads/master
Commit: ded204a4a10bfad1ed739fc98f612a41005640c5
Parents: 8b103da
Author: Owen O'Malley <omalley@apache.org>
Authored: Wed May 17 16:12:01 2017 -0700
Committer: Owen O'Malley <omalley@apache.org>
Committed: Fri Jun 16 11:29:28 2017 -0700

----------------------------------------------------------------------
 .../org/apache/orc/impl/TreeReaderFactory.java  |    6 +-
 .../java/org/apache/orc/impl/WriterImpl.java    | 2639 +-----------------
 .../orc/impl/writer/BinaryTreeWriter.java       |  137 +
 .../orc/impl/writer/BooleanTreeWriter.java      |   99 +
 .../apache/orc/impl/writer/ByteTreeWriter.java  |  109 +
 .../apache/orc/impl/writer/CharTreeWriter.java  |  122 +
 .../apache/orc/impl/writer/DateTreeWriter.java  |  124 +
 .../orc/impl/writer/DecimalTreeWriter.java      |  142 +
 .../orc/impl/writer/DoubleTreeWriter.java       |  112 +
 .../apache/orc/impl/writer/FloatTreeWriter.java |  113 +
 .../orc/impl/writer/IntegerTreeWriter.java      |  127 +
 .../apache/orc/impl/writer/ListTreeWriter.java  |  162 ++
 .../apache/orc/impl/writer/MapTreeWriter.java   |  173 ++
 .../orc/impl/writer/StringBaseTreeWriter.java   |  288 ++
 .../orc/impl/writer/StringTreeWriter.java       |   93 +
 .../orc/impl/writer/StructTreeWriter.java       |  156 ++
 .../orc/impl/writer/TimestampTreeWriter.java    |  165 ++
 .../org/apache/orc/impl/writer/TreeWriter.java  |  160 ++
 .../apache/orc/impl/writer/TreeWriterBase.java  |  374 +++
 .../apache/orc/impl/writer/UnionTreeWriter.java |  176 ++
 .../orc/impl/writer/VarcharTreeWriter.java      |  103 +
 .../apache/orc/impl/writer/WriterContext.java   |   95 +
 22 files changed, 3161 insertions(+), 2514 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/orc/blob/ded204a4/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
----------------------------------------------------------------------
diff --git a/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java b/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
index 4b369af..7e5c452 100644
--- a/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
+++ b/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
@@ -43,6 +43,7 @@ import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
 import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable;
 import org.apache.orc.TypeDescription;
 import org.apache.orc.OrcProto;
+import org.apache.orc.impl.writer.TimestampTreeWriter;
 
 /**
  * Factory for creating ORC tree readers.
@@ -938,7 +939,8 @@ public class TreeReaderFactory {
         threadLocalDateFormat.get().setTimeZone(writerTimeZone);
         try {
           long epoch = threadLocalDateFormat.get()
-            .parse(WriterImpl.BASE_TIMESTAMP_STRING).getTime() / WriterImpl.MILLIS_PER_SECOND;
+            .parse(TimestampTreeWriter.BASE_TIMESTAMP_STRING).getTime() /
+              TimestampTreeWriter.MILLIS_PER_SECOND;
           baseTimestampMap.put(timeZoneId, epoch);
           return epoch;
         } catch (ParseException e) {
@@ -977,7 +979,7 @@ public class TreeReaderFactory {
           if (millis < 0 && newNanos != 0) {
             millis -= 1;
           }
-          millis *= WriterImpl.MILLIS_PER_SECOND;
+          millis *= TimestampTreeWriter.MILLIS_PER_SECOND;
           long offset = 0;
           // If reader and writer time zones have different rules, adjust the timezone difference
           // between reader and writer taking day light savings into account.


Mime
View raw message