Jason Fehr has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23293


Change subject: IMPALA-13237: Match Behavior of Older Impala Versions
......................................................................

IMPALA-13237: Match Behavior of Older Impala Versions

Older versions of Impala set exec_state_ in ClientRequestState to
the error state earlier in the query processing than later versions.
This difference translates to when OpenTelemetry trace child spans
report an error status.

For example, in older Impala versions, if a query specifies a column
that does not exist, then the Planning child span has a status of
ERROR. However, in the latest version, the Planning span has a status of
OK, and only the Close span has a status of ERROR.

This difference caused the custom cluster test
test_otel_trace.py::TestOtelTrace::test_invalid_sql to fail in the
older Impala versions but pass in the latest version.

Additionally, older versions of Impala report a different default db.
The latest version reports whatever the client set. This difference
caused test_otel_trace.py::TestOtelTrace::test_retry_select_success
and test_otel_trace.py::TestOtelTrace::test_retry_select_failed to
fail in the older Impala versions because Impala used "tpch" as the
default db while the latest version used "default".

This change causes the OpenTelemetry trace child span where an error
actually occurs to report an error status, matching the behavior
of older Impala versions.

It also modifies test_otel_trace.py to expect the default db in the
OpenTelemetry trace "DefaultDb" attribute to match the query profile.

Testing accomplished by running the test_otel_trace.py custom cluster
tests.

Change-Id: If57aaef2da6d6904c66d0150f50ea9ac1c3ebc8c
---
M be/src/observe/span-manager.cc
M tests/custom_cluster/test_otel_trace.py
M tests/util/query_profile_util.py
3 files changed, 17 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/93/23293/4
--
To view, visit http://gerrit.cloudera.org:8080/23293
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If57aaef2da6d6904c66d0150f50ea9ac1c3ebc8c
Gerrit-Change-Number: 23293
Gerrit-PatchSet: 4
Gerrit-Owner: Jason Fehr <jf...@cloudera.com>

Reply via email to