[ 
https://issues.apache.org/jira/browse/TAJO-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734466#comment-14734466
 ] 

ASF GitHub Bot commented on TAJO-1782:
--------------------------------------

Github user jihoonson commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/711#discussion_r38904214
  
    --- Diff: 
tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java ---
    @@ -362,6 +362,39 @@ public void testStopWhenError() throws Exception {
       }
     
       @Test
    +  public void testRunWhenError() throws Exception {
    +    Thread t = new Thread() {
    +      public void run() {
    +        try {
    +          PipedOutputStream po = new PipedOutputStream();
    +          InputStream is = new PipedInputStream(po);
    +          ByteArrayOutputStream out = new ByteArrayOutputStream();
    +
    +          TajoConf tajoConf = new TajoConf();
    +          setVar(tajoCli, SessionVars.CLI_FORMATTER_CLASS, 
TajoCliOutputTestFormatter.class.getName());
    +          TajoCli tc = new TajoCli(tajoConf, new String[]{}, is, out);
    +
    +          tc.executeMetaCommand("\\set ON_ERROR_STOP false");
    +          assertSessionVar(tc, SessionVars.ON_ERROR_STOP.keyname(), 
"false");
    +
    +          po.write(new String("asdf;\nqwe;\nzxcv;\n").getBytes());
    +
    +          tc.runShell();
    +        } catch (Exception e) {
    +          e.printStackTrace();
    --- End diff --
    
    It would be good to throw Exception properly than just printing it.


> Check ON_ERROR_STOP flag in TSQL when error is occured 
> -------------------------------------------------------
>
>                 Key: TAJO-1782
>                 URL: https://issues.apache.org/jira/browse/TAJO-1782
>             Project: Tajo
>          Issue Type: Bug
>          Components: SQL Shell
>    Affects Versions: 0.11.0
>            Reporter: Dongkyu Hwangbo
>            Assignee: Dongkyu Hwangbo
>            Priority: Critical
>             Fix For: 0.11.0
>
>
> When I enter query with abnormal part, TSQL print out error type and error 
> message. and tsql is killed itself.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to