Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5933

Compute incremental stats should always return a result set

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.6.0, Impala 2.7.0, Impala 2.8.0, Impala 2.9.0, Impala 2.10.0
    • Fix Version/s: None
    • Component/s: Backend, Frontend
    • Labels:
      None
    • Epic Color:
      ghx-label-5

      Description

      Compute incremental stats should always return a result set that states which stats were computed/modified. Today, we have a shortcut in the code for compute incremental stats that does not return a result set when no new stats are computed because all partitions already have incremental stats.

      The fact that the same command sometimes returns a result set and sometimes not depending on the state of a table is strange, and can confuse clients like JDBC/ODBC that might reasonably expect a result set for that statement.

      The issue can be reproduced by running compute incremental stats twice in a row on the same table. The second run does not return a result set.

      The culprit is in client-request-state.cc ClientRequestState::WaitInternal():

      ...
        if (catalog_op_type() == TCatalogOpType::DDL &&
            ddl_type() == TDdlType::COMPUTE_STATS && child_queries.size() > 0) {
          RETURN_IF_ERROR(UpdateTableAndColumnStats(child_queries));
        }
      ...
      

      For a no-op incremental stats the number of child queries is 0, so we never set a result set or the result set metadata.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              alex.behm Alexander Behm
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development