Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-28579: Add query id to HiveSQLException #5520

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

difin
Copy link
Contributor

@difin difin commented Oct 28, 2024

What changes were proposed in this pull request?

Add query id to HiveSQLException's message. Using query id more info can easily be retrieved from Hiveserver2 log.

Why are the changes needed?

  • When 'hive.server2.async.exec.async.compile' = 'true' and an exception happens, an operational log is not displayed in Beeline and Hue (because stmtHandle is empty) and only exception message is displayed. Query id is not displayed.
  • When 'hive.server2.async.exec.async.compile' = 'false' and operational log level != 'NONE', operational log is displayed with query id and exception stack trace and also exception message is displayed.

When a query users should know Query ID, because using one they can find stack traces and other info in HiveServer2 log.

Does this PR introduce any user-facing change?

Yes

Is the change a dependency upgrade?

No

How was this patch tested?

Added new JDBC test to test that query id is added to exception message.

Copy link

sonarcloud bot commented Nov 11, 2024

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@difin difin merged commit a6e13c9 into apache:master Nov 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants