[
https://issues.apache.org/jira/browse/TAJO-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734123#comment-14734123
]
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_r38885171
--- Diff:
tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java ---
@@ -315,6 +315,38 @@ private void verifyStopWhenError() throws Exception {
assertOutputResult(consoleResult);
}
+ private void verifyRunWhenError() 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 =
TpchTestBase.getInstance().getTestingCluster().getConfiguration();
+ 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());
+
+ if(tc.runShell() == -1)
+ Thread.currentThread().interrupt();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ };
+
+ t.start();
+ Thread.sleep(5000);
+ if(!t.isAlive())
+ assertTrue(false);
--- End diff --
It would be better if some error message is also printed.
> 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)