[jira] [Assigned] (ORC-271) Improve HAS_PRE_1970/HAS_POST_2038 code

2017-12-04 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-271:
---


> Improve HAS_PRE_1970/HAS_POST_2038 code
> ---
>
> Key: ORC-271
> URL: https://issues.apache.org/jira/browse/ORC-271
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Minor
>
> gmtime suddenly returns correct tm value for -1000 in win32/msvc (but 
> gmtime_s not, as specified)
> Also, several test can be executed with negative time_t even if HAS_PRE_1970 
> is not defined.
> HAS_POST_2038 can be simplified, to avoid dependency on TZ.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ORC-271) Improve HAS_PRE_1970/HAS_POST_2038 code

2017-12-04 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-271:

Description: 
gmtime suddenly returns correct tm value for -1000 in win32/msvc.
Also, several tests can be executed with negative time_t even if HAS_PRE_1970 
is not defined.
HAS_POST_2038 can be simplified, to avoid dependency on TZ.

  was:
gmtime suddenly returns correct tm value for -1000 in win32/msvc (but gmtime_s 
not, as specified)
Also, several test can be executed with negative time_t even if HAS_PRE_1970 is 
not defined.
HAS_POST_2038 can be simplified, to avoid dependency on TZ.


> Improve HAS_PRE_1970/HAS_POST_2038 code
> ---
>
> Key: ORC-271
> URL: https://issues.apache.org/jira/browse/ORC-271
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Minor
>
> gmtime suddenly returns correct tm value for -1000 in win32/msvc.
> Also, several tests can be executed with negative time_t even if HAS_PRE_1970 
> is not defined.
> HAS_POST_2038 can be simplified, to avoid dependency on TZ.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (ORC-280) use Z_PREFIX if zlib requires it

2017-12-14 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-280:
---


> use Z_PREFIX if zlib requires it
> 
>
> Key: ORC-280
> URL: https://issues.apache.org/jira/browse/ORC-280
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>
> zlib can be compiled with --zprefix (adds z_ prefix to most public symbols), 
> to use it Z_PREFIX have to be defined before include "zlib.h"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (ORC-277) centos6 build (pre 4.7 gcc) is broken

2017-12-12 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-277:
---


> centos6 build (pre 4.7 gcc) is broken
> -
>
> Key: ORC-277
> URL: https://issues.apache.org/jira/browse/ORC-277
> Project: ORC
>  Issue Type: Bug
>  Components: C++
> Environment: centos6, gcc 4.4.7
>Reporter: rip.nsk
>Assignee: rip.nsk
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ORC-271) Improve HAS_PRE_1970

2017-12-05 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-271:

Description: 
gmtime suddenly returns correct tm value for -1000 in win32/msvc.
Also, several tests can be executed with negative time_t even if HAS_PRE_1970 
is not defined.

  was:
gmtime suddenly returns correct tm value for -1000 in win32/msvc.
Also, several tests can be executed with negative time_t even if HAS_PRE_1970 
is not defined.
HAS_POST_2038 can be simplified, to avoid dependency on TZ.


> Improve HAS_PRE_1970
> 
>
> Key: ORC-271
> URL: https://issues.apache.org/jira/browse/ORC-271
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Minor
>
> gmtime suddenly returns correct tm value for -1000 in win32/msvc.
> Also, several tests can be executed with negative time_t even if HAS_PRE_1970 
> is not defined.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ORC-271) Improve HAS_PRE_1970

2017-12-05 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-271:

Summary: Improve HAS_PRE_1970  (was: Improve HAS_PRE_1970/HAS_POST_2038 
code)

> Improve HAS_PRE_1970
> 
>
> Key: ORC-271
> URL: https://issues.apache.org/jira/browse/ORC-271
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Minor
>
> gmtime suddenly returns correct tm value for -1000 in win32/msvc.
> Also, several tests can be executed with negative time_t even if HAS_PRE_1970 
> is not defined.
> HAS_POST_2038 can be simplified, to avoid dependency on TZ.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (ORC-366) Improve TZDIR setup for WIN32

2018-05-16 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-366:
---


> Improve TZDIR setup for WIN32
> -
>
> Key: ORC-366
> URL: https://issues.apache.org/jira/browse/ORC-366
> Project: ORC
>  Issue Type: Improvement
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Major
>
> This change remove hard coded path to TZDIR (which probably does not work in 
> some cases in AppVeyor)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-357) Use orc::InputStream in getTimezoneByFilename

2018-05-02 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-357:
---

Assignee: rip.nsk

> Use orc::InputStream in getTimezoneByFilename
> -
>
> Key: ORC-357
> URL: https://issues.apache.org/jira/browse/ORC-357
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Minor
>
> This simplify function and makes it portable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-356) fix and extend Adaptor (.cc/.hh)

2018-04-30 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-356:
---


> fix and extend Adaptor (.cc/.hh)
> 
>
> Key: ORC-356
> URL: https://issues.apache.org/jira/browse/ORC-356
> Project: ORC
>  Issue Type: Improvement
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Major
>
> Currently C09Adapter.cc is excluded from the build (and includes non-exist 
> C09Adapter.hh).
> I'll fix this and extend it by adopters to support windows/msvc build.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ORC-356) fix and extend Adaptor (.cc/.hh)

2018-04-30 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-356:

Component/s: C++

> fix and extend Adaptor (.cc/.hh)
> 
>
> Key: ORC-356
> URL: https://issues.apache.org/jira/browse/ORC-356
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Major
>
> Currently C09Adapter.cc is excluded from the build (and includes non-exist 
> C09Adapter.hh).
> I'll fix this and extend it by adopters to support windows/msvc build.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-358) windows/msvc version of OrcFile/pread()

2018-05-03 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-358:
---


> windows/msvc version of OrcFile/pread()
> ---
>
> Key: ORC-358
> URL: https://issues.apache.org/jira/browse/ORC-358
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-334) Add AppVeyor support for integration on windows

2018-05-03 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-334:
---

Assignee: rip.nsk

> Add AppVeyor support for integration on windows 
> 
>
> Key: ORC-334
> URL: https://issues.apache.org/jira/browse/ORC-334
> Project: ORC
>  Issue Type: Improvement
>Reporter: Deepak Majeti
>Assignee: rip.nsk
>Priority: Major
>
> Like Travis CI, we must integrate AppVeyor for windows testing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-273) Bad memory access in TypeImpl::parseType

2017-12-21 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-273:
---

Assignee: rip.nsk

> Bad memory access in TypeImpl::parseType
> 
>
> Key: ORC-273
> URL: https://issues.apache.org/jira/browse/ORC-273
> Project: ORC
>  Issue Type: Bug
>Reporter: rip.nsk
>Assignee: rip.nsk
> Attachments: 010-TypeImpl.patch
>
>
> TypeImpl::parseType can access bad memory (types[nextPos]) for some inputs 
> (for example "map"), due to missed range checks (nextPos < 
> types.size()).
> immediate fix for example is attached, but not all possible cases are 
> covered..



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (ORC-293) RleEncoderV1::writeVulong works incorrectly if (sizeof(long) < sizeof(int64_t))

2018-01-19 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-293:
---


> RleEncoderV1::writeVulong works incorrectly if (sizeof(long) < 
> sizeof(int64_t))
> ---
>
> Key: ORC-293
> URL: https://issues.apache.org/jira/browse/ORC-293
> Project: ORC
>  Issue Type: Bug
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Blocker
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-289) Adaptor.hh is not installed

2018-01-13 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-289:
---

Assignee: rip.nsk

> Adaptor.hh is not installed
> ---
>
> Key: ORC-289
> URL: https://issues.apache.org/jira/browse/ORC-289
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Blocker
>
> Exceptions.hh depends on Adaptor.hh which is not part of installation.
> likely it should be replaced by orc-config.hh



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (ORC-334) Add AppVeyor support for integration on windows

2018-04-09 Thread rip.nsk (JIRA)

[ 
https://issues.apache.org/jira/browse/ORC-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16431561#comment-16431561
 ] 

rip.nsk commented on ORC-334:
-

I have a draft for this in my fork 
[https://github.com/rip-nsk/orc/tree/ORC-TBD___C%2B%2B%5D_appveyor|http://example.com]

[https://ci.appveyor.com/project/rip-nsk/orc/build/1.0.16|http://example.com]

> Add AppVeyor support for integration on windows 
> 
>
> Key: ORC-334
> URL: https://issues.apache.org/jira/browse/ORC-334
> Project: ORC
>  Issue Type: Improvement
>Reporter: Deepak Majeti
>Priority: Major
>
> Like Travis CI, we must integrate AppVeyor for windows testing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-332) Add syntax version to orc_proto.proto

2018-04-07 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-332:
---


> Add syntax version to orc_proto.proto
> -
>
> Key: ORC-332
> URL: https://issues.apache.org/jira/browse/ORC-332
> Project: ORC
>  Issue Type: Improvement
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Trivial
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-331) Add support for Windows/MSVC

2018-04-07 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-331:
---


> Add support for Windows/MSVC
> 
>
> Key: ORC-331
> URL: https://issues.apache.org/jira/browse/ORC-331
> Project: ORC
>  Issue Type: New Feature
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ORC-333) Minor changes to avoid warnings from MSVC

2018-04-07 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk reassigned ORC-333:
---


> Minor changes to avoid warnings from MSVC
> -
>
> Key: ORC-333
> URL: https://issues.apache.org/jira/browse/ORC-333
> Project: ORC
>  Issue Type: Improvement
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ORC-346) Bug in TimestampColumnReader (or Writer)

2018-04-21 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-346:

Priority: Blocker  (was: Critical)

> Bug in TimestampColumnReader (or Writer)
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Blocker
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ORC-346) Bug in TimestampColumnReader

2018-04-19 Thread rip.nsk (JIRA)

[ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1685#comment-1685
 ] 

rip.nsk commented on ORC-346:
-

TEST(Writer, writeTimestamp) failed with the following change:

diff --git a/c++/test/TestWriter.cc b/c++/test/TestWriter.cc
index c61d184..40d9243 100644
--- a/c++/test/TestWriter.cc
+++ b/c++/test/TestWriter.cc
@@ -570,7 +570,7 @@ namespace orc {
 
 std::vector times(rowCount);
 for (uint64_t i = 0; i < rowCount; ++i) {
- time_t currTime = std::time(nullptr);
+ time_t currTime = -14210715; // 1969-07-20 12:34:45
 times[i] = static_cast(currTime) - static_cast(i * 60);
 tsBatch->data[i] = times[i];
 tsBatch->nanoseconds[i] = static_cast(i * 1000);

> Bug in TimestampColumnReader
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ORC-346) Bug in TimestampColumnReader

2018-04-19 Thread rip.nsk (JIRA)

[ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1685#comment-1685
 ] 

rip.nsk edited comment on ORC-346 at 4/19/18 6:01 PM:
--

TEST(Writer, writeTimestamp) failed with the following change:

+c++/test/TestWriter.cc:573
--- time_t currTime = std::time(nullptr);
+++ time_t currTime = -14210715; // 1969-07-20 12:34:45


was (Author: rip@gmail.com):
TEST(Writer, writeTimestamp) failed with the following change:

diff --git a/c++/test/TestWriter.cc b/c++/test/TestWriter.cc
@@ -573,7 +573,7 @@ namespace orc {

- time_t currTime = std::time(nullptr);
 + time_t currTime = -14210715; // 1969-07-20 12:34:45

> Bug in TimestampColumnReader
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ORC-346) Bug in TimestampColumnReader

2018-04-19 Thread rip.nsk (JIRA)

[ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1685#comment-1685
 ] 

rip.nsk edited comment on ORC-346 at 4/19/18 6:00 PM:
--

TEST(Writer, writeTimestamp) failed with the following change:

diff --git a/c++/test/TestWriter.cc b/c++/test/TestWriter.cc
@@ -573,7 +573,7 @@ namespace orc {

- time_t currTime = std::time(nullptr);
 + time_t currTime = -14210715; // 1969-07-20 12:34:45


was (Author: rip@gmail.com):
TEST(Writer, writeTimestamp) failed with the following change:

diff --git a/c++/test/TestWriter.cc b/c++/test/TestWriter.cc
index c61d184..40d9243 100644
--- a/c++/test/TestWriter.cc
+++ b/c++/test/TestWriter.cc
@@ -570,7 +570,7 @@ namespace orc {
 
 std::vector times(rowCount);
 for (uint64_t i = 0; i < rowCount; ++i) {
- time_t currTime = std::time(nullptr);
+ time_t currTime = -14210715; // 1969-07-20 12:34:45
 times[i] = static_cast(currTime) - static_cast(i * 60);
 tsBatch->data[i] = times[i];
 tsBatch->nanoseconds[i] = static_cast(i * 1000);

> Bug in TimestampColumnReader
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ORC-346) Bug in TimestampColumnReader

2018-04-19 Thread rip.nsk (JIRA)

[ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1685#comment-1685
 ] 

rip.nsk edited comment on ORC-346 at 4/19/18 6:01 PM:
--

TEST(Writer, writeTimestamp) failed with the following change:

+c++/test/TestWriter.cc:573
-- time_t currTime = std::time(nullptr);
 + time_t currTime = -14210715; // 1969-07-20 12:34:45


was (Author: rip@gmail.com):
TEST(Writer, writeTimestamp) failed with the following change:

+c++/test/TestWriter.cc:573
--- time_t currTime = std::time(nullptr);
+++ time_t currTime = -14210715; // 1969-07-20 12:34:45

> Bug in TimestampColumnReader
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ORC-346) Bug in TimestampColumnReader

2018-04-19 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-346:

Summary: Bug in TimestampColumnReader  (was: Probably bug in 
TimestampColumnReader)

> Bug in TimestampColumnReader
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ORC-346) Bug in TimestampColumnReader (or Writer)

2018-04-19 Thread rip.nsk (JIRA)

 [ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rip.nsk updated ORC-346:

Summary: Bug in TimestampColumnReader (or Writer)  (was: Bug in 
TimestampColumnReader)

> Bug in TimestampColumnReader (or Writer)
> 
>
> Key: ORC-346
> URL: https://issues.apache.org/jira/browse/ORC-346
> Project: ORC
>  Issue Type: Bug
>  Components: C++
>Reporter: rip.nsk
>Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#33}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)