terraform-provider-databricks
terraform-provider-databricks copied to clipboard
Added support for popular column types for `resource_sql_table`
Changes
Added support for:
- Mapping of
integer->intandlong->bigint - Case insensitive column types
- Suppress diffs for column types
We might need other types of mapping as well but for now this seems sufficient according to the issue raised internally and https://github.com/databricks/terraform-provider-databricks/issues/3490
Note: Since the PR also adds case sensitive matching, it includes functionality from: https://github.com/databricks/terraform-provider-databricks/pull/3501. I have followed up with author to rebase and their unit test can be added here: https://github.com/databricks/terraform-provider-databricks/pull/3501#issuecomment-2088379422
Tests
Added integration test, before changes it fails during assertNoColumnTypeDiff because of using "integer" and after that also due to no suppress diff:
- [ ]
make testrun locally - [ ] relevant change in
docs/folder - [ ] covered with integration tests in
internal/acceptance - [ ] relevant acceptance tests are passing
- [ ] using Go SDK
long to bigint mapping works E2E in integration test and also another user mentions it here: https://github.com/databricks/terraform-provider-databricks/issues/3490#issuecomment-2066330433 but couldn't find this information in API docs.
Codecov Report
Attention: Patch coverage is 77.77778% with 2 lines in your changes are missing coverage. Please review.
Project coverage is 82.33%. Comparing base (
9648502) to head (6e6ad07).
Additional details and impacted files
@@ Coverage Diff @@
## main #3528 +/- ##
==========================================
- Coverage 82.34% 82.33% -0.01%
==========================================
Files 190 190
Lines 19312 19319 +7
==========================================
+ Hits 15902 15907 +5
- Misses 2479 2480 +1
- Partials 931 932 +1
| Files | Coverage Δ | |
|---|---|---|
| catalog/resource_sql_table.go | 88.72% <77.77%> (-0.31%) |
:arrow_down: |