Skip to content

Conversation

jlon
Copy link

@jlon jlon commented Aug 28, 2025

Why I'm doing:

Users encounter confusing "Unknown error" messages when Hive view queries fail, making it difficult to diagnose and fix issues.

What I'm doing:

Replace generic "Unknown error" with detailed, actionable error messages for Hive view queries:

  • Replace Preconditions.checkState with detailed column mismatch detection
  • Add try-catch blocks for view SQL parsing errors
  • Provide specific error messages with view name, problem type, and fix suggestions

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

@jlon jlon requested a review from a team as a code owner August 28, 2025 09:37
@mergify mergify bot assigned jlon Aug 28, 2025
@jlon jlon removed their assignment Aug 28, 2025
@mergify mergify bot assigned jlon Aug 28, 2025
try {
logicalPlan = transform(node.getQueryStatement().getQueryRelation());
} catch (Exception e) {
String viewName = node.getName() != null ? node.getName().toSql() : "unknown";
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember that error msg has already been printed in the connector view. wha't the e.getMessage in this block.

Copy link
Author

Choose a reason for hiding this comment

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

The error received in the mysql client is Unknown error。

@jlon jlon requested a review from stephen-shelby September 2, 2025 06:27
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.

2 participants