[
https://issues.apache.org/jira/browse/CALCITE-6202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17806629#comment-17806629
]
Benchao Li commented on CALCITE-6202:
-------------------------------------
The reason is that the outer {{PrintWriter}} will be closed anyway, and it will
close the {{System.out}}, after that, {{System.out}} cannot print anything.
That's why the exception can not be printed currently.
> `sqlsh` does not print error message when query fails
> -----------------------------------------------------
>
> Key: CALCITE-6202
> URL: https://issues.apache.org/jira/browse/CALCITE-6202
> Project: Calcite
> Issue Type: Improvement
> Components: os-adapter
> Affects Versions: 1.36.0
> Reporter: Benchao Li
> Assignee: Benchao Li
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.37.0
>
>
> For example, if we run following command:
> {code:bash}
> $ ./sqlsh "invalid SQL"
> {code}
> The query is obviously invalid, however it won't give any error messages. My
> proposal would be print the exception stack in stderr, it would be more easy
> to figure out what was wrong in the query.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)