diff --git a/python/pyspark/sql/tests/test_utils.py b/python/pyspark/sql/tests/test_utils.py index 5f85c1886b4b2..249e2b498b5b4 100644 --- a/python/pyspark/sql/tests/test_utils.py +++ b/python/pyspark/sql/tests/test_utils.py @@ -35,6 +35,7 @@ import pyspark.sql.functions as F from pyspark.sql.functions import to_date, unix_timestamp, from_unixtime from pyspark.sql.types import ( + DecimalType, StringType, ArrayType, LongType, @@ -1544,8 +1545,6 @@ def test_list_rows_unequal(self): ) def test_list_row_unequal_schema(self): - from pyspark.sql import Row - df1 = self.spark.createDataFrame( data=[ (1, 3000), @@ -1765,8 +1764,6 @@ def test_assert_data_frame_equal_not_support_streaming(self): def test_assert_schema_equal_with_decimal_types(self): """Test assertSchemaEqual with decimal types of different precision and scale (SPARK-51062).""" - from pyspark.sql.types import StructType, StructField, DecimalType - # Same precision and scale - should pass s1 = StructType( [