Skip to content

Commit

Permalink
fix: show overridden props in CLI (#5750)
Browse files Browse the repository at this point in the history
fixes: #5749

Co-authored-by: Andy Coates <[email protected]>
  • Loading branch information
big-andy-coates and big-andy-coates authored Jul 3, 2020
1 parent 2546794 commit f6fd2ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ private void printOverriddenProperties(final QueryDescription queryDescription)

final List<List<String>> rows = overriddenProperties.entrySet().stream()
.sorted(Entry.comparingByKey())
.map(prop -> Arrays.asList(prop.getKey(), "", Objects.toString(prop.getValue())))
.map(prop -> Arrays.asList(prop.getKey(), Objects.toString(prop.getValue())))
.collect(Collectors.toList());

new Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public void shouldPrintExplainQueryWithError() {
ImmutableSet.of("sink"),
"topology",
"executionPlan",
ImmutableMap.of(),
ImmutableMap.of("overridden.prop", 42),
ImmutableMap.of(new KsqlHostInfoEntity("foo", 123), KsqlQueryStatus.ERROR),
KsqlQueryType.PERSISTENT,
ImmutableList.of(new QueryError("error", Type.SYSTEM))
Expand Down Expand Up @@ -407,7 +407,9 @@ public void shouldPrintExplainQueryWithError() {
" \"sinks\" : [ \"sink\" ],\n" +
" \"topology\" : \"topology\",\n" +
" \"executionPlan\" : \"executionPlan\",\n" +
" \"overriddenProperties\" : { },\n" +
" \"overriddenProperties\" : {\n" +
" \"overridden.prop\" : 42\n" +
" },\n" +
" \"ksqlHostQueryStatus\" : {\n" +
" \"foo:123\" : \"ERROR\"\n" +
" },\n" +
Expand Down Expand Up @@ -452,8 +454,16 @@ public void shouldPrintExplainQueryWithError() {
"------------------- \n" +
"topology\n" +
"\n" +
"Overridden Properties\n" +
"---------------------\n" +
" Property | Value \n" +
"-------------------------\n" +
" overridden.prop | 42 \n" +
"-------------------------\n" +
"\n" +
"Error Details : error\n" +
"Error Type : SYSTEM\n"));
"Error Type : SYSTEM\n"
));
}
}

Expand Down

0 comments on commit f6fd2ee

Please sign in to comment.