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

Compute incremental stats should always return a result set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.6.0, Impala 2.7.0, Impala 2.8.0, Impala 2.9.0, Impala 2.10.0
    • Impala 3.0
    • Backend, Frontend
    • None
    • 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.

      Attachments

        Issue Links

          Activity

            People

              boroknagyz Zoltán Borók-Nagy
              alex.behm Alexander Behm
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: