Repository: incubator-impala
Updated Branches:
  refs/heads/master b27827744 -> 4471eb3b9


IMPALA-5232: Parquet reader error message prints memory address instead of value

Changed the argument of the message to print the size instead of
the memory location.

Testing: Automating the test would be non-trivial as it would require 
generating a corrupt parquet file to trigger the error condition. Also, 
the test would only have to check a change in the error message and not 
the control flow. Manually tested the error message by modifying the 
value of num_bytes and performing a select on a table in parquet format.
Tested both condition with the following values:
        - num_bytes = -1
        - num_bytes = *data_size + 1

Change-Id: I6a8f424807877c38d6f113db924cec8c68828c70
Reviewed-on: http://gerrit.cloudera.org:8080/6982
Reviewed-by: Sailesh Mukil <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/7763b8cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/7763b8cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/7763b8cc

Branch: refs/heads/master
Commit: 7763b8cc8d0e2a35a5ccf8dd37768750a11b5193
Parents: b278277
Author: poojanilangekar <[email protected]>
Authored: Wed May 24 15:23:36 2017 -0700
Committer: Impala Public Jenkins <[email protected]>
Committed: Thu May 25 19:17:12 2017 +0000

----------------------------------------------------------------------
 be/src/exec/parquet-column-readers.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/7763b8cc/be/src/exec/parquet-column-readers.cc
----------------------------------------------------------------------
diff --git a/be/src/exec/parquet-column-readers.cc 
b/be/src/exec/parquet-column-readers.cc
index 5c7c14d..9d4a329 100644
--- a/be/src/exec/parquet-column-readers.cc
+++ b/be/src/exec/parquet-column-readers.cc
@@ -109,7 +109,7 @@ Status ParquetLevelDecoder::Init(const string& filename,
   }
   if (UNLIKELY(num_bytes < 0 || num_bytes > *data_size)) {
     return Status(Substitute("Corrupt Parquet file '$0': $1 bytes of encoded 
levels but "
-        "only $2 bytes left in page", filename, num_bytes, data_size));
+        "only $2 bytes left in page", filename, num_bytes, *data_size));
   }
   *data += num_bytes;
   *data_size -= num_bytes;

Reply via email to