Hi Jihoon, Thank you so much for looking into this.
Niv From: Jihoon Son [mailto:[email protected]] Sent: יום ה 15 אוקטובר 2015 14:23 To: [email protected] Subject: Re: tsql return code Hi Niv, I tested 0.10.1 and 0.11. As you said, 0.10.1 returns 0 regardless of the query result. Fortunately, I found that 0.11 works well as follows. $ bin/tsql -c "abc def" ERROR: syntax error at or near "<EOF>" LINE 1: abc def ^ $ echo $? 255 $ bin/tsql -c "select count(*) from region" Progress: 100%, response time: 1.506 sec ?count ------------------------------- 5 (1 rows, 1.506 sec, 2 B selected) $ echo $? 0 Thanks! Jihoon 2015년 10월 15일 (목) 오후 3:35, Zvi, Niv <[email protected]<mailto:[email protected]>>님이 작성: Hi Jihoon, Thank you for replying so quickly! The problem is with even a simple command line, such as: tsql -c "abc def" -h localhost -p 26002. The output is: ERROR: syntax error at or near 'abc' LINE 1:0 abc abc And the return code is 0. I will give 0.11 a try and let you know the result. Thanks, Niv From: Jihoon Son [mailto:[email protected]<mailto:[email protected]>] Sent: יום ד 14 אוקטובר 2015 19:54 To: [email protected]<mailto:[email protected]> Subject: Re: tsql return code Hi Niv, thanks for reporting. As you said, returning 0 on failure can be a critical problem when your program depends on the return code. So, to solve this problem quickly, it would be more helpful if you share which query returns 0 instead of 255 with 0.10.1. Anyway, returning 0 on failure with 0.10.1 may be a bug, I think. If you don't mind, would you test with 0.11.0 and share the result? I hope that this bug is fixed with 0.11.0. You can download the nightly build version here https://builds.apache.org/job/Tajo-master-nightly/lastSuccessfulBuild/artifact/tajo-dist/target. Sincerely, Jihoon 2015년 10월 14일 (수) 오후 9:39, Zvi, Niv <[email protected]<mailto:[email protected]>>님이 작성: Hi, In Tajo 9 when we run a command line with wrong format/parameter we get return code 255. In 10.1 the return code is 0. This is a problem as we are relaying on the return code of the cli utility. Is this is something that can be fixed? Thanks, Niv
