Skip to content

Commit 9c63317

Browse files
committed
[SPARK-52183] Update SparkSQLRepl example to show up to 10k rows
### What changes were proposed in this pull request? This PR aims to update `SparkSQLRepl` example to show up to 10k rows. ### Why are the changes needed? Currently, `SparkSQLRepl` uses the `show()` with the default parameters. Although we cannot handle large-numbers of rows due to `grpc_max_message_size`, we had better have more reasonable default value. ```SQL spark-sql (default)> SELECT * FROM RANGE(21); +---+ | id| +---+ | 0| |...| | 19| +---+ only showing top 20 rows Time taken: 118 ms ``` ### Does this PR introduce _any_ user-facing change? This is an example. ### How was this patch tested? Manual test. ```SQL $ swift run spark-sql (default)> SELECT * FROM RANGE(10001); ... only showing top 10000 rows Time taken: 142 ms ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #159 from dongjoon-hyun/SPARK-52183. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent e346c9e commit 9c63317

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SparkSQLRepl/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ while isRunning {
4646
break
4747
default:
4848
do {
49-
try await spark.time(spark.sql(String(match.1)).show)
49+
try await spark.time({ try await spark.sql(String(match.1)).show(10000, false) })
5050
} catch {
5151
print("Error: \(error)")
5252
}

0 commit comments

Comments
 (0)