-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support value-wise query result #108
Comments
sqlite only supports value-wise. cockroach only supports row-wise, but will use value-wise when option |
I can work around this with fn sql_result_validator(actual: &[Vec<String>], expected: &[String]) -> bool {
let expected = expected
.iter()
.map(|s| s.split_ascii_whitespace().collect::<Vec<_>>())
.collect::<Vec<_>>();
if let Some(first_actual) = actual.first() {
if expected.iter().all(|v| v.len() == 1) {
// SQLite "value-wise" compatibility.
// Flatten and re-chunk based on column width in `actual`.
let expected = expected.into_iter().flatten().collect::<Vec<_>>();
let expected = expected.chunks(first_actual.len()).collect::<Vec<_>>();
return expected == actual;
}
}
actual == expected
} |
FYI, #123 contains support for value sort. I forget whether it's finished though. |
https://duckdb.org/dev/sqllogictest/result_verification#row-wise-vs-value-wise-result-ordering
The text was updated successfully, but these errors were encountered: