Skip to content

Commit

Permalink
fix: do not set query_acceleration_max_scale_factor when enable enabl…
Browse files Browse the repository at this point in the history
…e_query_acceleration = false (#1474)

Co-authored-by: Scott Winkler <[email protected]>
  • Loading branch information
mnagaa and sfc-gh-swinkler authored Jan 26, 2023
1 parent 9f37b99 commit d62b1b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/resources/warehouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,12 @@ func ReadWarehouse(d *schema.ResourceData, meta interface{}) error {
if err = d.Set("enable_query_acceleration", w.EnableQueryAcceleration); err != nil {
return err
}
if err = d.Set("query_acceleration_max_scale_factor", w.QueryAccelerationMaxScaleFactor); err != nil {
return err
if w.EnableQueryAcceleration {
if err = d.Set("query_acceleration_max_scale_factor", w.QueryAccelerationMaxScaleFactor); err != nil {
return err
}
}

log.Printf("[DEBUG] warehouse type is: %s", w.WarehouseType)
if w.WarehouseType == "STANDARD" || w.WarehouseType == "SNOWPARK-OPTIMIZED" {
err = d.Set("warehouse_type", w.WarehouseType)
Expand Down

0 comments on commit d62b1b4

Please sign in to comment.