Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-vbudati committed Dec 17, 2024
1 parent 5353f51 commit 32b7795
Show file tree
Hide file tree
Showing 3 changed files with 4,760 additions and 10,104 deletions.
4 changes: 2 additions & 2 deletions src/snowflake/snowpark/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5258,15 +5258,15 @@ def sequence(
start_col = _to_col_if_str(start, "sequence")
stop_col = _to_col_if_str(stop, "sequence")
if step is None:
step = iff(builtin("sign", _emit_ast=False)(stop_col - start_col) > 0, 1, -1)
step = iff(builtin("sign")(stop_col - start_col) > 0, 1, -1)
ans = builtin("array_generate_range", _emit_ast=False)(
start_col, stop_col + step, step
)
ans._ast = ast
return ans

step_col = _to_col_if_str(step, "sequence")
step_sign = iff(builtin("sign", _emit_ast=False)(step_col) > 0, 1, -1)
step_sign = iff(builtin("sign")(step_col) > 0, 1, -1)
ans = builtin("array_generate_range", _emit_ast=False)(
start_col, stop_col + step_sign, step_col
)
Expand Down
17 changes: 16 additions & 1 deletion tests/ast/data/Dataframe.to_snowpark_pandas.test
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ body {
}
}
src {
end_column: 41
end_line: 25
file: "SRC_POSITION_TEST_MODE"
start_column: 13
start_line: 25
}
variant {
Expand Down Expand Up @@ -64,7 +67,10 @@ body {
}
}
src {
end_column: 52
end_line: 27
file: "SRC_POSITION_TEST_MODE"
start_column: 29
start_line: 27
}
}
Expand Down Expand Up @@ -93,7 +99,10 @@ body {
list: "A"
}
src {
end_column: 65
end_line: 29
file: "SRC_POSITION_TEST_MODE"
start_column: 29
start_line: 29
}
}
Expand Down Expand Up @@ -123,7 +132,10 @@ body {
}
}
src {
end_column: 70
end_line: 31
file: "SRC_POSITION_TEST_MODE"
start_column: 29
start_line: 31
}
}
Expand Down Expand Up @@ -156,7 +168,10 @@ body {
list: "A"
}
src {
end_column: 87
end_line: 33
file: "SRC_POSITION_TEST_MODE"
start_column: 29
start_line: 33
}
}
Expand All @@ -183,5 +198,5 @@ client_language {
}
client_version {
major: 1
minor: 25
minor: 26
}
Loading

0 comments on commit 32b7795

Please sign in to comment.