risinglightdb / sqllogictest-rs

Sqllogictest (dialect with extensions) parser and runner in Rust.
Apache License 2.0
176 stars 47 forks source link

feat: match multiline error #200

Closed BugenZhao closed 1 year ago

BugenZhao commented 1 year ago

Support matching multiline error message under ---- for both statement error and query error.

  query error
  SELECT 1/0;
  ----
  db error: ERROR: Failed to execute query

  Caused by these errors:
    1: Failed to evaluate expression: 1/0
    2: Division by zero

The output error message must be the exact match of the expected one to pass the test, except for the leading and trailing whitespaces. Users may use --override to let the runner update the test files with the actual output.

Empty lines are allowed in the expected error message. As a result, the message must end with two consecutive empty lines.

Breaking changes in the parser:

BugenZhao commented 1 year ago

An example generated by sqllogictest --override in RisingWave:

https://github.com/risingwavelabs/risingwave/blob/39493a08ea84d5ea5713ed745ddcf5d17c59c526/e2e_test/error_ui/main.slt#L1-L10

xxchan commented 1 year ago

@skyzh @wangrunji0408 can we add @BugenZhao as a colaborator.

skyzh commented 1 year ago

@skyzh @wangrunji0408 can we add @BugenZhao as a colaborator.

Yep let's do that!

BugenZhao commented 1 year ago

Wow, semver-check gets really slow (up to 30min).

BugenZhao commented 1 year ago

@xxchan Would you please release a new version for this? 🥰

xxchan commented 1 year ago

@BugenZhao Done