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
-
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
- relates to
-
IMPALA-5903 Inconsistent specification of result set and result set metadata
- Resolved