enhancement: better diff for result mismatch
xxchan opened this issue · 5 comments
We use space as separator for actual
, but expected
might use tab. This can look bad.
This can be tricky since we support custom validator
.
sqllogictest-rs/sqllogictest/src/runner.rs
Lines 749 to 759 in 27eb9f5
Here's an example from @BugenZhao
risingwavelabs/risingwave#9671 (comment)
Maybe we can:
- change
validator
to sth likenormalizer
and output normalized results. - Output normalized output if
default_validator
is used.
I'm curious what's the use case for validators? 👀
As indicated by its signature, the actual result is separated by columns Vec<Vec<String>>
, but the expected result is not. So we need to normalize the results. validator
is the most flexible form to achieve this, but not sure if it's really needed.
See also #109
sqllogictest-rs/sqllogictest/src/runner.rs
Lines 411 to 426 in 27eb9f5
I think we can parse both space and tab as separator in parser?
Okay well this is not handled by parser. Then it might be a good idea to split by both space and tab in default validator :(