confluentinc / ksql

The database purpose-built for stream processing applications.
https://ksqldb.io
Other
123 stars 1.04k forks source link

Make incompatible schema error message clearer to grok #5017

Open rmoff opened 4 years ago

rmoff commented 4 years ago

ksqlDB 0.8.1

Is your feature request related to a problem? Please describe.

When running an INSERT INTO with an incompatible schema the error message is not so clear to grok as it's all on a single line:

Incompatible schema between results and sink. Result schema is `ROWKEY` STRING KEY, `MAC` STRING, `IP` STRING, `NAME` STRING, `MODEL` STRING, `TYPE` STRING, `IS_GUEST` BOOLEAN, but the sink schema is `ROWKEY` STRING KEY, `MAC` STRING, `IP` STRING, `NAME` STRING, `MODEL` STRING, `TYPE` STRING, `GUEST` BOOLEAN.

Describe the solution you'd like Split and align the lines, like so:

Incompatible schema between results and sink. 
Result schema is `ROWKEY` STRING KEY, `MAC` STRING, `IP` STRING, `NAME` STRING, `MODEL` STRING, `TYPE` STRING, `IS_GUEST` BOOLEAN
  Sink schema is `ROWKEY` STRING KEY, `MAC` STRING, `IP` STRING, `NAME` STRING, `MODEL` STRING, `TYPE` STRING, `GUEST` BOOLEAN.

For bonus points just show the delta:

Incompatible schema between results and sink. 
Result schema matches except for `IS_GUEST` BOOLEAN
  Sink schema matches except for `GUEST` BOOLEAN.
rmoff commented 4 years ago

Hit this again today. As well as the two suggestions above, I'd also add using colour to highlight the difference, something like this: image

rmoff commented 4 years ago

@MichaelDrogalis is there a slush fund of dev time for minor little improvements such as this? :)

MichaelDrogalis commented 4 years ago

Should get scooped up in a fix-it-week in the future!