databend icon indicating copy to clipboard operation
databend copied to clipboard

Feature: use goldenfile for logictest file

Open xudong963 opened this issue 3 years ago • 2 comments

Summary

Small changes may require modification of multiple logic tests results

Manually changing them one by one is too painful :(

xudong963 avatar Sep 16 '22 10:09 xudong963

can i do it?

hanyisong avatar Sep 19 '22 16:09 hanyisong

Summary

Small changes may require modification of multiple logic tests results

Manually changing them one by one is too painful :(

for example?

hanyisong avatar Sep 20 '22 03:09 hanyisong

@xudong963 Can I understand that part of the goldenfile is ported to sqllogictest for unified maintenance?

e.g. I compared https://github.com/datafuselabs/databend/blob/main/src/query/functions-v2/tests/it/scalars/variant.rs and https://github.com/datafuselabs/databend/blob/main/tests/logictest/suites/base/02_function/02_0048_function_semi_structureds_parse_json and found that their test content is the same, I think goldenfile can be deleted directly

hanyisong avatar Sep 26 '22 16:09 hanyisong

Can I understand that part of the goldenfile is ported to sqllogictest for unified maintenance?

No.

The current situation is that the logic test files need to be modified each time manually.

For the golden file, we can just generate a new test result file with REGENERATE_GOLDENFILES=1, and then just check if the new result is reasonable, which can significantly reduce the cost of maintaining the test.

xudong963 avatar Sep 27 '22 04:09 xudong963