kyuubi
kyuubi copied to clipboard
[Improvement] Use `beeline --silent=true -u "**" -f` to execute a sql file will get many blank row
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Search before asking
- [X] I have searched in the issues and found no similar issues.
What would you like to be improved?
1、Use beeline --silent=true -u "**" -f to execute a sql file will get many blank row, and no execute time at tail
2、Want it no useless blank row,just like spark-sqlclient
How should we improve?
Maybe can modify source code or add log file to control it
Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
- [X] No. I cannot submit a PR at this time.
Hello @Ocean22, Thanks for finding the time to report the issue! We really appreciate the community's efforts to improve Apache Kyuubi.
@Ocean22 Thanks for your report. It may be caused by comment lines or empty lines in your script.
I did a simple test to reproduce it.
execute script with the following content:
-- 111
-- 2222
-- 333
use sample;
show tables;
get the following print:
Thanks for your test,and I tested it just now,even no comment lines and empty lines,it will still get blank row.Do you have any way to solve it?
The empty lines seem to be printed by ConsoleReader#accept and output to stderr , so we can solve it like:
-f XXX.sql 2>/dev/null
May that cause error messages lost if redirecting stderr to /dev/null?
May that cause error messages lost if redirecting
stderrto/dev/null?
Yes, error messages are also lost.
Thanks for @wForget's guidance,we can merge stderr and stdout,then use grep -v '^\s*$' to solve this problem.
no execute time at tail
Hive4 has added a new option to support output execution time, --silent=true --report=true, but Kyuubi uses Hive3.
HIVE-22204: Beeline option to show/not show execution report
https://issues.apache.org/jira/browse/HIVE-22204
@cxzl25 Thanks for your tip.