From 4b4179fbc89eb13bad7c51bc7662d62f7a1921fc Mon Sep 17 00:00:00 2001 From: Adam Ling Date: Thu, 2 Nov 2023 17:17:32 -0700 Subject: [PATCH] clean up --- src/snowflake/snowpark/dataframe.py | 1 - tests/integ/test_column.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/snowflake/snowpark/dataframe.py b/src/snowflake/snowpark/dataframe.py index 74d06eb00a0..d863d101b2f 100644 --- a/src/snowflake/snowpark/dataframe.py +++ b/src/snowflake/snowpark/dataframe.py @@ -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)) diff --git a/tests/integ/test_column.py b/tests/integ/test_column.py index be5ad3dee2c..692827d8559 100644 --- a/tests/integ/test_column.py +++ b/tests/integ/test_column.py @@ -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