Print query detail when client uses -f or --execute with --debug option#12216
Print query detail when client uses -f or --execute with --debug option#12216ebyhr wants to merge 1 commit intoprestodb:masterfrom ebyhr:cli-debug
Conversation
|
With this change the query details will be printed to Posix defines these streams as "standard output (for writing conventional output), and standard error (for writing diagnostic output)", so I think in |
|
@nezihyigitbasi Thank you for your comment. Let me fix the output direction to stderr. |
Previously, presto cli with -f or --exceucte only shows result set even if --debug option is used. By this commit, presto cli prints the details the same as interactive mode.
|
Changed output stream to stderr. $ presto --debug -f test.sql 2>/dev/null
"7500001","Customer#007500001","o NIcrMHVcnYy3b6Or","24","34-544-477-2141","4996.81","BUILDING","ully alongside of the deposits. even, even f"
$
$ presto --debug -f test.sql
"11250001","Customer#011250001","RNFodMnae9vkA5Bswzb42rnp","14","24-397-921-1461","4930.66","HOUSEHOLD"," along the even packages nag according to the "
Query 20190115_132958_00012_vncji, FINISHED, 1 node
http://localhost:8080/ui/query.html?20190115_132958_00012_vncji
Splits: 21 total, 21 done (100.00%)
CPU Time: 0.1s total, 159K rows/s, 0B/s, 76% active
Per Node: 0.9 parallelism, 141K rows/s, 0B/s
Parallelism: 0.9
Peak Memory: 0B
0:00 [21.9K rows, 0B] [141K rows/s, 0B/s]$ presto --debug --execute "select * from tpch.sf10000.customer limit 1;" 2>/dev/null
"1","Customer#000000001","IVhzIApeRb ot,c,E","15","25-989-741-2988","711.56","BUILDING","to the even, regular platelets. regular, ironic epitaphs nag e"```
$
$ presto --debug --execute "select * from tpch.sf10000.customer limit 1;"
"750000001","Customer#750000001","LC4O0BHw2 wNroftaCEp0SDGZ0r1SQV4nm4Gt","11","21-456-231-7942","-765.35","HOUSEHOLD","s wake carefully outside the regular instructions. ironicall"
Query 20190115_133029_00013_vncji, FINISHED, 1 node
http://localhost:8080/ui/query.html?20190115_133029_00013_vncji
Splits: 21 total, 21 done (100.00%)
CPU Time: 0.1s total, 153K rows/s, 0B/s, 67% active
Per Node: 0.9 parallelism, 145K rows/s, 0B/s
Parallelism: 0.9
Peak Memory: 0B
0:00 [21.9K rows, 0B] [145K rows/s, 0B/s] |
Previously, presto cli with -f or --exceucte only shows result set even if --debug option is used.
By this commit, presto cli prints the details the same as interactive mode.
-f and --debug
--execute and --debug
No changes if --debug isn't used.
-f
--execute