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

2018-02-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user asfgit closed the pull request at:

https://github.com/apache/orc/pull/212


> 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
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Blocker
>




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


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

2018-01-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user xndai commented on the issue:

https://github.com/apache/orc/pull/212
  
+1


> 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
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Blocker
>




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


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

2018-01-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user rip-nsk commented on a diff in the pull request:

https://github.com/apache/orc/pull/212#discussion_r163724343
  
--- Diff: c++/include/orc/Common.hh ---
@@ -69,7 +69,7 @@ namespace orc {
 UNKNOWN_WRITER = INT32_MAX
   };
 
-  enum CompressionKind {
+  enum CompressionKind : std::int64_t {
--- End diff --

I mean that constants CompressionKind_MAX and WriterVersion_MAX are not 
used and can be removed.


> 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
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Blocker
>




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


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

2018-01-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user xndai commented on a diff in the pull request:

https://github.com/apache/orc/pull/212#discussion_r162789950
  
--- Diff: c++/include/orc/Common.hh ---
@@ -69,7 +69,7 @@ namespace orc {
 UNKNOWN_WRITER = INT32_MAX
   };
 
-  enum CompressionKind {
+  enum CompressionKind : std::int64_t {
--- End diff --

The definition of CompressionKind_MAX already makes CompressionKind a int64 
type. Enum base type is a C++ 11 feature and should at least be configurable 
through orc-config.hh


> 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
>  Components: C++
>Reporter: rip.nsk
>Assignee: rip.nsk
>Priority: Blocker
>




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


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

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user rip-nsk commented on a diff in the pull request:

https://github.com/apache/orc/pull/212#discussion_r162755501
  
--- Diff: c++/src/RLEv1.cc ---
@@ -169,11 +169,11 @@ void RleEncoderV1::writeVslong(int64_t val) {
 
 void RleEncoderV1::writeVulong(int64_t val) {
   while (true) {
-if ((val & ~0x7f) == 0) {
+if ((val & ~BASE_128_MASK) == 0) {
--- End diff --

It is added to match code in RleDecoderV1::readLong


> 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] [Commented] (ORC-293) RleEncoderV1::writeVulong works incorrectly if (sizeof(long) < sizeof(int64_t))

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user wgtmac commented on a diff in the pull request:

https://github.com/apache/orc/pull/212#discussion_r162755019
  
--- Diff: c++/src/RLEv1.cc ---
@@ -169,11 +169,11 @@ void RleEncoderV1::writeVslong(int64_t val) {
 
 void RleEncoderV1::writeVulong(int64_t val) {
   while (true) {
-if ((val & ~0x7f) == 0) {
+if ((val & ~BASE_128_MASK) == 0) {
--- End diff --

I don't think we need change here as ~0x7f will be implicitly converted to 
int64_t.
Same for the below.


> 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] [Commented] (ORC-293) RleEncoderV1::writeVulong works incorrectly if (sizeof(long) < sizeof(int64_t))

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


Github user rip-nsk commented on a diff in the pull request:

https://github.com/apache/orc/pull/212#discussion_r162753893
  
--- Diff: c++/src/RLEv1.cc ---
@@ -148,7 +148,7 @@ void RleEncoderV1::write(int64_t value) {
 numLiterals += 1;
   } else {
 numLiterals -= static_cast(MINIMUM_REPEAT - 1);
-long base = literals[numLiterals];
+int64_t base = literals[numLiterals];
--- End diff --

'auto' is more suitable, but it seems its usage is avoided here


> 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] [Commented] (ORC-293) RleEncoderV1::writeVulong works incorrectly if (sizeof(long) < sizeof(int64_t))

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ORC-293:


GitHub user rip-nsk opened a pull request:

https://github.com/apache/orc/pull/212

ORC-293: [C++] Fix RleEncoderV1 for case when sizeof(long) < sizeof(int64_t)

and minor related changes.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rip-nsk/orc ORC-293

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/orc/pull/212.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #212


commit 3ec5b72cd4e44d475fdfdbdbf3f7c5089a174a6c
Author: rip-nsk 
Date:   2018-01-19T23:03:33Z

Fix RleEncoderV1 for case when sizeof(long) < sizeof(int64_t) and minor 
related changes.




> 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)