Skip to content

Conversation

@jackyhu-db
Copy link
Contributor

@jackyhu-db jackyhu-db commented Jul 8, 2025

PR Description

Motivation

When DESC TABLE EXTENDED {fullTableName} AS JSON fails to run, we will fallback base class GetColumnsExtendedAsync which calls 3 metadata query to get the info, but the current check is based on the error message, which is not accurate, instead, we can check the SqlState = 42601 which is the error of SQL syntax error, it means the command is not supported by the runtime, then we can fallback to the base class

Changes

  • Update the fallback condition check in Databricks GetColumnsExtendedAsync

Testing

  • E2E Test with cluster does not support this command

@github-actions github-actions bot added this to the ADBC Libraries 20 milestone Jul 8, 2025
@CurtHagenlocher CurtHagenlocher merged commit 573a326 into apache:main Jul 8, 2025
7 checks passed
descResult = await descStmt.ExecuteQueryAsync();
}
catch (HiveServer2Exception ex) when (ex.Message.Contains("Error running query"))
catch (HiveServer2Exception ex) when (ex.SqlState == "42601")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

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.

2 participants