Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change println() to println(), disable event expansion #3

Merged
merged 2 commits into from
Mar 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions kql-cli/src/main/java/io/confluent/kql/KQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void startConsole() throws Exception {
new AnsiStringsCompleter("select", "show queries",
"terminate", "exit", "describe", "print", "list topics",
"list streams", "create topic", "create stream", "create table"));
console.setExpandEvents(false); // Disable event expansion so things like '!=' are left alone by the console reader
String line = null;
while ((line = console.readLine()) != null) {
if (line.length() == 0) {
Expand All @@ -86,9 +87,9 @@ public void startConsole() throws Exception {
for (String runningQueryId : liveQueries.keySet()) {
liveQueries.get(runningQueryId).getQueryKafkaStreams().close();
}
console.println("");
console.println();
console.println("Goodbye!");
console.println("");
console.println();
console.flush();
console.close();
System.exit(0);
Expand Down Expand Up @@ -316,7 +317,7 @@ private void startQuery(final String queryString, final Query query) throws Exce
queryPairInfo.getQueryOutputNode());
}
if (isCLI) {
console.println("");
console.println();
}
}

Expand Down Expand Up @@ -422,7 +423,7 @@ private void showColumns(final String name) throws IOException {
}
console.println("TOPIC: " + name.toUpperCase() + " Key: " + dataSource.getKeyField().name()
+ " Type: " + dataSource.getDataSourceType());
console.println("");
console.println();
console.println(
" Column | Type | Comment ");
console.println(
Expand Down