Skip to content

Commit

Permalink
[CALCITE-6202] sqlsh does not print error message when query fails
Browse files Browse the repository at this point in the history
  • Loading branch information
libenchao committed Jan 16, 2024
1 parent 24ea6be commit 86d5720
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions plus/src/main/java/org/apache/calcite/adapter/os/SqlShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,18 @@ private static String model() {
/** Main entry point. */
@SuppressWarnings("CatchAndPrintStackTrace")
public static void main(String[] args) {
try (PrintWriter err =
new PrintWriter(
new OutputStreamWriter(System.err, StandardCharsets.UTF_8));
InputStreamReader in =
new InputStreamReader(System.in, StandardCharsets.UTF_8);
PrintWriter out =
new PrintWriter(
new OutputStreamWriter(System.out, StandardCharsets.UTF_8))) {
try {
final PrintWriter err =
new PrintWriter(
new OutputStreamWriter(System.err, StandardCharsets.UTF_8));
final InputStreamReader in =
new InputStreamReader(System.in, StandardCharsets.UTF_8);
final PrintWriter out =
new PrintWriter(
new OutputStreamWriter(System.out, StandardCharsets.UTF_8));
new SqlShell(in, out, err, args).run();
} catch (Throwable e) {
e.printStackTrace();
e.printStackTrace(System.err);
}
}

Expand Down

0 comments on commit 86d5720

Please sign in to comment.