bec80d7eec
### What changes were proposed in this pull request? This PR introduces a new property `spark.sql.cli.print.header` to let users change the behavior of printing header for spark-sql CLI by SET command. ### Why are the changes needed? Like Hive CLI, spark-sql CLI accepts `hive.cli.print.header` property and we can change the behavior of printing header. But spark-sql CLI doesn't allow users to change Hive specific configurations dynamically by SET command. So, it's better to support the way to change the behavior by SET command. ### Does this PR introduce _any_ user-facing change? Yes. Users can dynamically change the behavior by SET command. ### How was this patch tested? I confirmed with the following commands/queries. ``` spark-sql> select (1) as a, (2) as b, (3) as c, (4) as d; 1 2 3 4 Time taken: 3.218 seconds, Fetched 1 row(s) spark-sql> set spark.sql.cli.print.header=true; key value spark.sql.cli.print.header true Time taken: 1.506 seconds, Fetched 1 row(s) spark-sql> select (1) as a, (2) as b, (3) as c, (4) as d; a b c d 1 2 3 4 Time taken: 0.79 seconds, Fetched 1 row(s) ``` Closes #31173 from sarutak/spark-sql-print-header. Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> |
||
---|---|---|
.. | ||
src | ||
pom.xml |