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 2019/06/25 15:45:30 UTC

[impala] 18/20: IMPALA-7330. After LOAD DATA, only refresh affected partition

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

tarmstrong pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/impala.git

commit cfbfface1728bedbdfdb26791a6e8babeb38ddb1
Author: Todd Lipcon <to...@cloudera.com>
AuthorDate: Mon Jul 23 12:28:43 2018 -0700

    IMPALA-7330. After LOAD DATA, only refresh affected partition
    
    This changes LOAD DATA so that, if a specific partition is provided,
    only the named partition will be refreshed upon completion of the
    statement.
    
    No new tests are added since this code path is covered by existing tests
    and this just optimizes the metadata reload.
    
    I did verify looking at the catalogd logs that only the single specified
    partition was refreshed when I issued a LOAD statement from the shell.
    
    Change-Id: I3b29846deac49a89abcd3495e4b757ef536ff331
    Reviewed-on: http://gerrit.cloudera.org:8080/11014
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Todd Lipcon <to...@apache.org>
---
 be/src/service/client-request-state.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/be/src/service/client-request-state.cc b/be/src/service/client-request-state.cc
index 2c4be43..829f211 100644
--- a/be/src/service/client-request-state.cc
+++ b/be/src/service/client-request-state.cc
@@ -180,6 +180,10 @@ Status ClientRequestState::Exec(TExecRequest* exec_request) {
       reset_req.reset_metadata_params.__set_is_refresh(true);
       reset_req.reset_metadata_params.__set_table_name(
           exec_request_.load_data_request.table_name);
+      if (exec_request_.load_data_request.__isset.partition_spec) {
+        reset_req.reset_metadata_params.__set_partition_spec(
+            exec_request_.load_data_request.partition_spec);
+      }
       reset_req.reset_metadata_params.__set_sync_ddl(
           exec_request_.query_options.sync_ddl);
       catalog_op_executor_.reset(