-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed databricks_table
update for column
block
#1468
Conversation
if !d.HasChange(field) { | ||
|
||
var old, new interface{} | ||
if field == "columns" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be simpler to do:
if field == "columns" {
field = "column"
}
old, new = d.GetChange(field)
if !d.HasChange(field) {
continue
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the API expect columns
in the payload however
catalog/update.go
Outdated
} | ||
|
||
//ignore storage_location for MANAGED tables | ||
if field == "storage_location" && d.Get("table_type") != "EXTERNAL" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be handled as suppress diff?
Also, should we handle the case when people will change from managed to external?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table_type
cannot be updated
Codecov Report
@@ Coverage Diff @@
## master #1468 +/- ##
=======================================
Coverage 90.11% 90.12%
=======================================
Files 126 126
Lines 10208 10218 +10
=======================================
+ Hits 9199 9209 +10
Misses 642 642
Partials 367 367
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
databricks_table
update for column
block
databricks_table
update for column
blockdatabricks_table
update for column
block
* fix and simplify update table logic * fix managed table update logic * add suppress_diff to table location
Close #1455
There must be a more programmatic way to do this...