Skip to content

[Feature] Include column name and types in sql_table column type change error#5478

Open
moomindani wants to merge 2 commits intodatabricks:mainfrom
moomindani:improve-sql-table-column-type-error-message
Open

[Feature] Include column name and types in sql_table column type change error#5478
moomindani wants to merge 2 commits intodatabricks:mainfrom
moomindani:improve-sql-table-column-type-error-message

Conversation

@moomindani
Copy link

@moomindani moomindani commented Mar 13, 2026

Changes

When a databricks_sql_table plan fails due to a column type or identity change, the error message now specifies which column is affected and shows the old and new values.

Before: changing the 'type' of an existing column is not supported
After: changing the 'type' of an existing column is not supported: column 'price' type changed from 'string' to 'int'

Closes #4919

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

How it was tested

  • Updated existing unit test TestResourceSqlTableUpdateTable_ColumnsTypeThrowsError to assert the new error message includes column name and old/new types (column 'one' type changed from 'string' to 'int')
  • Verified TestResourceSqlTableUpdateTable_ColumnsTypeUpperLowerCaseThrowsError still passes (case-insensitive comparison: string vs STRING should not error)
  • All 12 TestResourceSqlTableUpdateTable* tests pass (column add, drop, update, membership changes, etc.)
  • make fmt lint ws passes cleanly

…ge error

When a databricks_sql_table plan fails due to a column type change,
the error message now specifies which column is affected and shows the
old and new types, making it easier to debug. Same improvement applied
to the identity change error for consistency.

Closes databricks#4919

Co-authored-by: Isaac
@moomindani moomindani requested review from a team as code owners March 13, 2026 01:46
@moomindani moomindani requested review from tejaskochar-db and removed request for a team March 13, 2026 01:46
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5478
  • Commit SHA: 819c4a2e7bef7987570f651345cc2176bfe048b3

Checks will be approved automatically on success.

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.

[FEATURE] Specify for which column the plan fails for a databricks_sql_table resource if the column type was changed

1 participant