Skip to content

Conversation

@caohai
Copy link
Member

@caohai caohai commented Nov 7, 2025

Description

Fixes two bugs in HandleSimpleExecuteRequest:

  1. SQL error messages not returned: Queries with SQL errors (e.g., invalid table names) returned generic "Query has no results to return" instead of actual error details. Fixed by collecting error messages via BatchMessageSent events and checking batch.HasError in the completion callback.

  2. Queries without result sets treated as errors: Valid DML/DDL statements (UPDATE, DELETE, CREATE TABLE) incorrectly returned errors. Fixed by returning success with empty result arrays when resultSets.Count == 0.

What these two fixes look like for query execution in GHCP:

image image

Code Changes Checklist

  • New or updated unit tests added (2 integration tests)
  • All existing tests pass (dotnet test)
  • Code follows contributing guidelines
  • Logging/telemetry updated if relevant
  • No protocol or behavioral regressions

Reviewers: Please read our reviewer guidelines

aasimkhan30
aasimkhan30 previously approved these changes Nov 7, 2025
@caohai caohai merged commit 5389658 into main Nov 8, 2025
5 checks passed
@caohai caohai deleted the hacao/extra-error-msg branch November 8, 2025 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants