We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98a1b86 commit f527478Copy full SHA for f527478
tests/connect/test_collect.py
@@ -0,0 +1,14 @@
1
+from __future__ import annotations
2
+
3
4
+def test_range_collect(spark_session):
5
+ # Create a range using Spark
6
+ # For example, creating a range from 0 to 9
7
+ spark_range = spark_session.range(10) # Creates DataFrame with numbers 0 to 9
8
9
+ # Collect the data
10
+ collected_rows = spark_range.collect()
11
12
+ # Verify the collected data has expected values
13
+ assert len(collected_rows) == 10, "Should have 10 rows"
14
+ assert [row["id"] for row in collected_rows] == list(range(10)), "Should contain values 0-9"
0 commit comments