Skip to content
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

fix: Make ReadWarehouse compatible with quoted resource identifiers #907

Merged
merged 5 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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