Skip to content

Migrate subtrait tests to insta #15398

@blaginin

Description

@blaginin

In #15178, we're switching hard-coded constants in tests to insta.

This issue targets updating subtrait tests (datafusion/substrait).

Examples of tests that need to be switched to insta

  • "Projection: PARTSUPP.PS_PARTKEY, sum(PARTSUPP.PS_SUPPLYCOST * PARTSUPP.PS_AVAILQTY) AS value\
    \n Sort: sum(PARTSUPP.PS_SUPPLYCOST * PARTSUPP.PS_AVAILQTY) DESC NULLS FIRST\
    \n Filter: sum(PARTSUPP.PS_SUPPLYCOST * PARTSUPP.PS_AVAILQTY) > (<subquery>)\
    \n Subquery:\
  • assert_expected_plan(
    "SELECT sum(CASE WHEN a > 0 THEN 1 ELSE NULL END) FROM data",
    "Aggregate: groupBy=[[]], aggr=[[sum(CASE WHEN data.a > Int64(0) THEN Int64(1) ELSE Int64(NULL) END) AS sum(CASE WHEN data.a > Int64(0) THEN Int64(1) ELSE NULL END)]]\
    \n TableScan: data projection=[a]",
    true
    )

Check the original issue for tips on how to do the switch and examples of completed PRs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions