Skip to content

Commit

Permalink
for Java compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jackylk committed Feb 26, 2015
1 parent d7acc18 commit bb54537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ class DataFrame protected[sql](
*/
def show(numRows: Int = 20): Unit = println(showString(numRows))

/**
* Displays the [[DataFrame]] in a tabular form. (For Java compatibility)
*/
def show(): Unit = println(showString(20))

/**
* Cartesian join with another [[DataFrame]].
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void testVarargMethods() {
@Test
public void testShow() {
DataFrame df = context.table("testData");
df.show(10);
df.show();
df.show(1000);
}
}

0 comments on commit bb54537

Please sign in to comment.