Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aling committed Nov 3, 2023
1 parent 9024c1b commit 4b4179f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/snowflake/snowpark/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,6 @@ def sort(
)

if self._select_statement:

return self._with_plan(self._select_statement.sort(sort_exprs))
return self._with_plan(Sort(sort_exprs, self._plan))

Expand Down
4 changes: 2 additions & 2 deletions tests/integ/test_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ def test_cast_decimal(session, number_word):
def test_cast_map_type(session):
df = session.create_dataframe([['{"key": "1"}']], schema=["a"])
result = df.select(parse_json(df["a"]).cast("object")).collect()
assert json.loads(result[0][0])
assert json.loads(result[0][0]) == {"key": "1"}


@pytest.mark.localtest
def test_cast_array_type(session):
df = session.create_dataframe([["[1,2,3]"]], schema=["a"])
result = df.select(parse_json(df["a"]).cast("array")).collect()
assert json.loads(result[0][0])
assert json.loads(result[0][0]) == [1, 2, 3]


@pytest.mark.localtest
Expand Down

0 comments on commit 4b4179f

Please sign in to comment.