-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
In #15178, we're switching hard-coded constants in tests to insta.
This issue targets updating sql tests (datafusion/sql).
Examples of tests that need to be switched to insta:
datafusion/datafusion/sql/tests/sql_integration.rs
Lines 95 to 99 in 45ed5aa
fn parse_ident_normalization() { let test_data = [ ( "SELECT CHARACTER_LENGTH('str')", "Ok(Projection: character_length(Utf8(\"str\"))\n EmptyRelation)", datafusion/datafusion/sql/tests/sql_integration.rs
Lines 962 to 966 in 45ed5aa
let expected = "Projection: person.first_name AS fn, max(person.age)\ \n Filter: max(person.age) > Int64(2) AND person.first_name = Utf8(\"M\")\ \n Aggregate: groupBy=[[person.first_name]], aggr=[[max(person.age)]]\ \n TableScan: person"; quick_test(sql, expected); datafusion/datafusion/sql/tests/sql_integration.rs
Lines 1353 to 1356 in 45ed5aa
quick_test( "SELECT ((age + 1) / 2) * (age + 1), MIN(first_name) FROM person GROUP BY age + 1", "Projection: person.age + Int64(1) / Int64(2) * person.age + Int64(1), min(person.first_name)\ \n Aggregate: groupBy=[[person.age + Int64(1)]], aggr=[[min(person.first_name)]]\
Check the original issue for tips on how to do the switch and examples of completed PRs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers