You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2018/05/01 14:20:11 UTC

[arrow] branch master updated: ARROW-2503: [Python] Prevent trailing space character for string statistics

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new a3aaff5  ARROW-2503: [Python] Prevent trailing space character for string statistics
a3aaff5 is described below

commit a3aaff51d13702be413241b0d16657ca820a4cdc
Author: Julius Neuffer <ju...@blue-yonder.com>
AuthorDate: Tue May 1 16:19:55 2018 +0200

    ARROW-2503: [Python] Prevent trailing space character for string statistics
    
    The trailing space is added in `parquet-cpp.` `pyarrow` calls the function `FormatStatValue` which adds the trailing space (https://github.com/apache/parquet-cpp/blob/master/src/parquet/types.cc#L52).
    
    https://issues.apache.org/jira/browse/PARQUET-1283 is about fixing this behavior. Once the corresponding PR is merged into `parquet-cpp` and `pyarrow` is synced, the `test_parquet.py:test_parquet_column_statistics_api` will break for `str`. This PR fixes that breakage.
    
    Author: Julius Neuffer <ju...@blue-yonder.com>
    
    Closes #1945 from jneuff/fix-trailing-space-in-string-statistics and squashes the following commits:
    
    f702f18 <Julius Neuffer> ARROW-2503:  Fix string statistics test
---
 python/pyarrow/tests/test_parquet.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyarrow/tests/test_parquet.py b/python/pyarrow/tests/test_parquet.py
index 86cf417..9e4d3d2 100644
--- a/python/pyarrow/tests/test_parquet.py
+++ b/python/pyarrow/tests/test_parquet.py
@@ -587,7 +587,7 @@ def test_parquet_metadata_api():
         ([-1.1, 2.2, 2.3, None, 4.4], np.float64, -1.1, 4.4, 1, 4),
         (
             [u'', u'b', unichar(1000), None, u'aaa'],
-            str, b' ', (unichar(1000) + u' ').encode('utf-8'), 1, 4
+            str, b'', unichar(1000).encode('utf-8'), 1, 4
         ),
         ([True, False, False, True, True], np.bool, False, True, 0, 5),
     ]

-- 
To stop receiving notification emails like this one, please contact
apitrou@apache.org.