Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,11 @@ public void TestSignaturesV2_3_X()

Assert.IsType<Row[]>(_df.Collect().ToArray());

Assert.IsType<Row[]>(_df.ToLocalIterator().ToArray());
if (SparkSettings.Version < new Version(Versions.V3_0_0))
{
// The following APIs are removed in Spark 3.0.
Assert.IsType<Row[]>(_df.ToLocalIterator().ToArray());
}

Assert.IsType<long>(_df.Count());

Expand Down
4 changes: 4 additions & 0 deletions src/csharp/Microsoft.Spark/Sql/DataFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,11 @@ public IEnumerable<Row> Collect()
/// Returns an iterator that contains all of the rows in this `DataFrame`.
/// The iterator will consume as much memory as the largest partition in this `DataFrame`.
/// </summary>
/// <remarks>
/// This API is removed in Spark 3.0.
/// </remarks>
/// <returns>Row objects</returns>
[Removed(Versions.V3_0_0)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public IEnumerable<Row> ToLocalIterator()
{
return GetRows("toPythonIterator");
Expand Down