Skip to content

Commit

Permalink
fix: Make ReadWarehouse compatible with quoted resource identifiers (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
thenaturalist authored Mar 14, 2022
1 parent b640a60 commit 72cedc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/resources/warehouse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func expectReadWarehouse(mock sqlmock.Sqlmock) {
rows = sqlmock.NewRows(
[]string{"key", "value", "default", "level", "description", "type"},
).AddRow("MAX_CONCURRENCY_LEVEL", 8, 8, "WAREHOUSE", "", "NUMBER")
mock.ExpectQuery("SHOW PARAMETERS IN WAREHOUSE good_name").WillReturnRows(rows)
mock.ExpectQuery("SHOW PARAMETERS IN WAREHOUSE \"good_name\"").WillReturnRows(rows)
}

func TestWarehouseRead(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/snowflake/warehouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (wb *WarehouseBuilder) Create() *CreateBuilder {

// ShowParameters returns the query to show the parameters for the warehouse
func (wb *WarehouseBuilder) ShowParameters() string {
return fmt.Sprintf("SHOW PARAMETERS IN WAREHOUSE %v", wb.Builder.name)
return fmt.Sprintf("SHOW PARAMETERS IN WAREHOUSE %q", wb.Builder.name)
}

func Warehouse(name string) *WarehouseBuilder {
Expand Down

0 comments on commit 72cedc4

Please sign in to comment.