You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/08/31 01:11:54 UTC

incubator-impala git commit: IMPALA-4019: initialize member variables in HdfsTableSink

Repository: incubator-impala
Updated Branches:
  refs/heads/master 12496c7fb -> d3494d8e0


IMPALA-4019: initialize member variables in HdfsTableSink

This fixes a bug that could potentially lead to the IMPALA-4019 crash.
default_partition_ should be initialized to NULL so that we can check
if the HdfsTableSink was correctly initialized with a default
partition in Open().

After this change the query will fail with an error status instead of
potentially crashing if table_desc_->partition_descriptors() is missing
the default partition.

Change-Id: If62def81f7d06b42ffbd0dc2dcb0e777421a1edf
Reviewed-on: http://gerrit.cloudera.org:8080/4171
Reviewed-by: Alex Behm <al...@cloudera.com>
Reviewed-by: Dan Hecht <dh...@cloudera.com>
Tested-by: Internal 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/d3494d8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/d3494d8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/d3494d8e

Branch: refs/heads/master
Commit: d3494d8e00d6d83ca33311217760abc95bee0921
Parents: 12496c7
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Tue Aug 30 11:54:19 2016 -0700
Committer: Internal Jenkins <cl...@gerrit.cloudera.org>
Committed: Wed Aug 31 01:09:15 2016 +0000

----------------------------------------------------------------------
 be/src/exec/hdfs-table-sink.cc | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d3494d8e/be/src/exec/hdfs-table-sink.cc
----------------------------------------------------------------------
diff --git a/be/src/exec/hdfs-table-sink.cc b/be/src/exec/hdfs-table-sink.cc
index fb547b4..3211c1c 100644
--- a/be/src/exec/hdfs-table-sink.cc
+++ b/be/src/exec/hdfs-table-sink.cc
@@ -59,6 +59,9 @@ HdfsTableSink::HdfsTableSink(const RowDescriptor& row_desc,
     const vector<TExpr>& select_list_texprs,
     const TDataSink& tsink)
     :  DataSink(row_desc),
+       table_desc_(NULL),
+       default_partition_(NULL),
+       current_row_(NULL),
        table_id_(tsink.table_sink.target_table_id),
        skip_header_line_count_(
            tsink.table_sink.hdfs_table_sink.__isset.skip_header_line_count