You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2019/08/05 14:05:46 UTC
[hawq] branch master updated: HAWQ-1736.Fix bug timestamp orc select
This is an automated email from the ASF dual-hosted git repository.
huor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hawq.git
The following commit(s) were added to refs/heads/master by this push:
new 45434cd HAWQ-1736.Fix bug timestamp orc select
45434cd is described below
commit 45434cd4f056ebe13c7b99af0c7c1d2068925680
Author: wang.ziming <wa...@oushu.io>
AuthorDate: Mon Aug 5 17:57:42 2019 +0800
HAWQ-1736.Fix bug timestamp orc select
---
depends/storage/src/storage/format/orc/reader.cc | 5 +----
src/test/feature/ExternalSource/test_extfmt_orc.cpp | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/depends/storage/src/storage/format/orc/reader.cc b/depends/storage/src/storage/format/orc/reader.cc
index e88e62a..60f60c4 100644
--- a/depends/storage/src/storage/format/orc/reader.cc
+++ b/depends/storage/src/storage/format/orc/reader.cc
@@ -1501,15 +1501,12 @@ void TimestampColumnReader::next(ColumnVectorBatch& rowBatch,
nanoBuffer[i] *= 10;
}
}
- int64_t writerTime = secsBuffer[i] + epochOffset;
+ // int64_t writerTime = secsBuffer[i] + epochOffset;
// For now only support timestamp without timezone
// secsBuffer[i] =
// writerTime + writerTimezone.getVariant(writerTime).gmtOffset;
secsBuffer[i] +=
(ORC_TIMESTAMP_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECONDS_PER_DAY;
- if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {
- secsBuffer[i] -= 1;
- }
}
}
}
diff --git a/src/test/feature/ExternalSource/test_extfmt_orc.cpp b/src/test/feature/ExternalSource/test_extfmt_orc.cpp
index bc3831c..7a20f9b 100644
--- a/src/test/feature/ExternalSource/test_extfmt_orc.cpp
+++ b/src/test/feature/ExternalSource/test_extfmt_orc.cpp
@@ -770,7 +770,7 @@ TEST_F(TestExtOrc, BoolTypeTest) {
"f|\nf|\n");
}
-TEST_F(TestExtOrc, DISABLED_DateTypeTest) {
+TEST_F(TestExtOrc, DateTypeTest) {
SQLUtility util;
std::string url = generateUrl(util, "TestExtOrc_DateTypeTest");
ASSERT_FALSE(url.empty());