Skip to content

Commit

Permalink
Add issue numbers to TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki committed Dec 4, 2024
1 parent 54f5f78 commit ae55806
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions pkg/sdk/functions_gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestFunctions_CreateForJava(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, errNotSet("CreateForJavaFunctionOptions", "Handler"))
})

// TODO [next PR]: remove with old function removal for V1
// TODO [SNOW-1348103]: remove with old function removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -221,7 +221,7 @@ func TestFunctions_CreateForJavascript(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, errNotSet("CreateForJavascriptFunctionOptions", "FunctionDefinition"))
})

// TODO [next PR]: remove with old function removal for V1
// TODO [SNOW-1348103]: remove with old function removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -323,7 +323,7 @@ func TestFunctions_CreateForPython(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, NewError("IMPORTS must not be empty when AS is nil"))
})

// TODO [next PR]: remove with old function removal for V1
// TODO [SNOW-1348103]: remove with old function removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -478,7 +478,7 @@ func TestFunctions_CreateForScala(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, errNotSet("CreateForScalaFunctionOptions", "Handler"))
})

// TODO [next PR]: remove with old function removal for V1
// TODO [SNOW-1348103]: remove with old function removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -585,7 +585,7 @@ func TestFunctions_CreateForSQL(t *testing.T) {
assertOptsValidAndSQLEquals(t, opts, `CREATE FUNCTION %s () RETURNS FLOAT AS '3.141592654::FLOAT'`, id.FullyQualifiedName())
})

// TODO [next PR]: remove with old function removal for V1
// TODO [SNOW-1348103]: remove with old function removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down
20 changes: 10 additions & 10 deletions pkg/sdk/procedures_gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestProcedures_CreateForJava(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, NewError("TARGET_PATH must be nil when AS is nil"))
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -213,7 +213,7 @@ func TestProcedures_CreateForJavaScript(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, ErrInvalidObjectIdentifier)
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -309,7 +309,7 @@ func TestProcedures_CreateForPython(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, errExactlyOneOf("CreateForPythonProcedureOptions.Returns", "ResultDataType", "Table"))
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -485,7 +485,7 @@ func TestProcedures_CreateForScala(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, NewError("TARGET_PATH must be nil when AS is nil"))
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -612,7 +612,7 @@ func TestProcedures_CreateForSQL(t *testing.T) {
assertOptsInvalidJoinedErrors(t, opts, errExactlyOneOf("CreateForSQLProcedureOptions.Returns", "ResultDataType", "Table"))
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.OrReplace = Bool(true)
Expand Down Expand Up @@ -968,7 +968,7 @@ func TestProcedures_CreateAndCallForJava(t *testing.T) {
assertOptsValidAndSQLEquals(t, opts, `WITH %s AS PROCEDURE () RETURNS TABLE () LANGUAGE JAVA RUNTIME_VERSION = '1.8' PACKAGES = ('com.snowflake:snowpark:latest') HANDLER = 'TestFunc.echoVarchar' CALL %s ()`, id.FullyQualifiedName(), id.FullyQualifiedName())
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.Arguments = []ProcedureArgument{
Expand Down Expand Up @@ -1138,7 +1138,7 @@ func TestProcedures_CreateAndCallForScala(t *testing.T) {
assertOptsValidAndSQLEquals(t, opts, `WITH %s AS PROCEDURE () RETURNS TABLE () LANGUAGE SCALA RUNTIME_VERSION = '2.12' PACKAGES = ('com.snowflake:snowpark:1.2.0') HANDLER = 'TestFunc.echoVarchar' CALL %s ()`, id.FullyQualifiedName(), id.FullyQualifiedName())
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.Arguments = []ProcedureArgument{
Expand Down Expand Up @@ -1312,7 +1312,7 @@ func TestProcedures_CreateAndCallForPython(t *testing.T) {
assertOptsValidAndSQLEquals(t, opts, `WITH %s AS PROCEDURE () RETURNS TABLE () LANGUAGE PYTHON RUNTIME_VERSION = '3.8' PACKAGES = ('snowflake-snowpark-python') HANDLER = 'udf' CALL %s ()`, id.FullyQualifiedName(), id.FullyQualifiedName())
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.Arguments = []ProcedureArgument{
Expand Down Expand Up @@ -1446,7 +1446,7 @@ func TestProcedures_CreateAndCallForJavaScript(t *testing.T) {
assertOptsValidAndSQLEquals(t, opts, `WITH %s AS PROCEDURE () RETURNS FLOAT LANGUAGE JAVASCRIPT AS 'return 1;' CALL %s ()`, id.FullyQualifiedName(), id.FullyQualifiedName())
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.Arguments = []ProcedureArgument{
Expand Down Expand Up @@ -1562,7 +1562,7 @@ func TestProcedures_CreateAndCallForSQL(t *testing.T) {
assertOptsValidAndSQLEquals(t, opts, `WITH %s AS PROCEDURE () RETURNS TABLE () LANGUAGE SQL AS '3.141592654::FLOAT' CALL %s ()`, id.FullyQualifiedName(), id.FullyQualifiedName())
})

// TODO [next PR]: remove with old procedure removal for V1
// TODO [SNOW-1348106]: remove with old procedure removal for V1
t.Run("all options - old data types", func(t *testing.T) {
opts := defaultOpts()
opts.Arguments = []ProcedureArgument{
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/testint/functions_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func TestInt_FunctionsShowByID(t *testing.T) {
require.Equal(t, *e, *es)
})

// TODO [next PR]: remove with old function removal for V1
// TODO [SNOW-1348103]: remove with old function removal for V1
t.Run("function returns non detailed data types of arguments - old data types", func(t *testing.T) {
// This test proves that every detailed data types (e.g. VARCHAR(20) and NUMBER(10, 0)) are generalized
// on Snowflake side (to e.g. VARCHAR and NUMBER) and that sdk.ToDataType mapping function maps detailed types
Expand Down

0 comments on commit ae55806

Please sign in to comment.