Skip to content

Commit

Permalink
Run make pre-push
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki committed Dec 4, 2024
1 parent ae55806 commit 23322eb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/resources/procedure.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func createJavaProcedure(ctx context.Context, d *schema.ResourceData, meta inter
}
procedureDefinition := d.Get("statement").(string)
runtimeVersion := d.Get("runtime_version").(string)
var packages []sdk.ProcedurePackageRequest
packages := make([]sdk.ProcedurePackageRequest, 0)
for _, item := range d.Get("packages").([]interface{}) {
packages = append(packages, *sdk.NewProcedurePackageRequest(item.(string)))
}
Expand Down Expand Up @@ -373,7 +373,7 @@ func createScalaProcedure(ctx context.Context, d *schema.ResourceData, meta inte
}
procedureDefinition := d.Get("statement").(string)
runtimeVersion := d.Get("runtime_version").(string)
var packages []sdk.ProcedurePackageRequest
packages := make([]sdk.ProcedurePackageRequest, 0)
for _, item := range d.Get("packages").([]interface{}) {
packages = append(packages, *sdk.NewProcedurePackageRequest(item.(string)))
}
Expand Down Expand Up @@ -484,7 +484,7 @@ func createPythonProcedure(ctx context.Context, d *schema.ResourceData, meta int
}
procedureDefinition := d.Get("statement").(string)
runtimeVersion := d.Get("runtime_version").(string)
var packages []sdk.ProcedurePackageRequest
packages := make([]sdk.ProcedurePackageRequest, 0)
for _, item := range d.Get("packages").([]interface{}) {
packages = append(packages, *sdk.NewProcedurePackageRequest(item.(string)))
}
Expand Down
1 change: 0 additions & 1 deletion pkg/sdk/functions_gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ func TestFunctions_CreateForJavascript(t *testing.T) {
opts.FunctionDefinition = "return 1;"
assertOptsValidAndSQLEquals(t, opts, `CREATE OR REPLACE TEMPORARY SECURE FUNCTION %s (d FLOAT DEFAULT 1.0) COPY GRANTS RETURNS FLOAT NOT NULL LANGUAGE JAVASCRIPT CALLED ON NULL INPUT IMMUTABLE COMMENT = 'comment' AS 'return 1;'`, id.FullyQualifiedName())
})

}

func TestFunctions_CreateForPython(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion pkg/sdk/procedures_gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ func TestProcedures_CreateForJavaScript(t *testing.T) {
opts.ProcedureDefinition = "return 1;"
assertOptsValidAndSQLEquals(t, opts, `CREATE OR REPLACE SECURE PROCEDURE %s (d FLOAT DEFAULT 1.0) COPY GRANTS RETURNS FLOAT NOT NULL LANGUAGE JAVASCRIPT STRICT COMMENT = 'test comment' EXECUTE AS CALLER AS 'return 1;'`, id.FullyQualifiedName())
})

}

func TestProcedures_CreateForPython(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/sql_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ func (v sqlParameterClause) String() string {
if v.value == nil {
return s
}
var value = v.value
value := v.value
if dataType, ok := value.(datatypes.DataType); ok {
// We check like this and not by `dataType == nil` because for e.g. `var *datatypes.ArrayDataType` return false in a normal nil check
if reflect.ValueOf(dataType).IsZero() {
Expand Down
1 change: 0 additions & 1 deletion pkg/sdk/sql_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ func TestBuilder_sql(t *testing.T) {
}

func TestBuilder_DataType(t *testing.T) {

type dataTypeTestHelper struct {
DataType datatypes.DataType `ddl:"parameter,no_quotes,no_equals"`
}
Expand Down

0 comments on commit 23322eb

Please sign in to comment.