=== Stage 1 ===
SortShuffleWriterExec: partitioning=Hash([r_regionkey@0], 16)
  FilterExec: r_name@1 = AMERICA, projection=[r_regionkey@0]
    StatsExec: rows=5

=== Stage 2 ===
ShuffleWriterExec: partitioning: None
  UnresolvedShuffleExec: stage=1, partitioning: Hash([r_regionkey@0], 16)

=== Stage 3 ===
SortShuffleWriterExec: partitioning=Hash([n_nationkey@0], 16)
  StatsExec: rows=25

=== Stage 4 ===
ShuffleWriterExec: partitioning: None
  UnresolvedShuffleExec: stage=3, partitioning: Hash([n_nationkey@0], 16)

=== Stage 5 ===
SortShuffleWriterExec: partitioning=Hash([p_partkey@0], 16)
  FilterExec: p_type@1 = ECONOMY ANODIZED STEEL, projection=[p_partkey@0]
    StatsExec: rows=20000000

=== Stage 6 ===
SortShuffleWriterExec: partitioning=Hash([l_partkey@1], 16)
  StatsExec: rows=600037902

=== Stage 7 ===
SortShuffleWriterExec: partitioning=Hash([l_suppkey@1], 16)
  ProjectionExec: expr=[l_orderkey@1 as l_orderkey, l_suppkey@3 as l_suppkey, l_extendedprice@4 as l_extendedprice, l_discount@5 as l_discount]
    SortMergeJoinExec: join_type=Inner, on=[(p_partkey@0, l_partkey@1)]
      SortExec: expr=[p_partkey@0 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=5, partitioning: Hash([p_partkey@0], 16)
      SortExec: expr=[l_partkey@1 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=6, partitioning: Hash([l_partkey@1], 16)

=== Stage 8 ===
SortShuffleWriterExec: partitioning=Hash([s_suppkey@0], 16)
  StatsExec: rows=1000000

=== Stage 9 ===
SortShuffleWriterExec: partitioning=Hash([l_orderkey@0], 16)
  ProjectionExec: expr=[l_orderkey@0 as l_orderkey, l_extendedprice@2 as l_extendedprice, l_discount@3 as l_discount, s_nationkey@5 as s_nationkey]
    SortMergeJoinExec: join_type=Inner, on=[(l_suppkey@1, s_suppkey@0)]
      SortExec: expr=[l_suppkey@1 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=7, partitioning: Hash([l_suppkey@1], 16)
      SortExec: expr=[s_suppkey@0 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=8, partitioning: Hash([s_suppkey@0], 16)

=== Stage 10 ===
SortShuffleWriterExec: partitioning=Hash([o_orderkey@0], 16)
  FilterExec: o_orderdate@2 >= 1995-01-01 AND o_orderdate@2 <= 1996-12-31
    StatsExec: rows=150000000

=== Stage 11 ===
SortShuffleWriterExec: partitioning=Hash([o_custkey@3], 16)
  ProjectionExec: expr=[l_extendedprice@1 as l_extendedprice, l_discount@2 as l_discount, s_nationkey@3 as s_nationkey, o_custkey@5 as o_custkey, o_orderdate@6 as o_orderdate]
    SortMergeJoinExec: join_type=Inner, on=[(l_orderkey@0, o_orderkey@0)]
      SortExec: expr=[l_orderkey@0 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=9, partitioning: Hash([l_orderkey@0], 16)
      SortExec: expr=[o_orderkey@0 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=10, partitioning: Hash([o_orderkey@0], 16)

=== Stage 12 ===
SortShuffleWriterExec: partitioning=Hash([c_custkey@0], 16)
  StatsExec: rows=15000000

=== Stage 13 ===
SortShuffleWriterExec: partitioning=Hash([c_nationkey@4], 16)
  ProjectionExec: expr=[l_extendedprice@0 as l_extendedprice, l_discount@1 as l_discount, s_nationkey@2 as s_nationkey, o_orderdate@4 as o_orderdate, c_nationkey@6 as c_nationkey]
    SortMergeJoinExec: join_type=Inner, on=[(o_custkey@3, c_custkey@0)]
      SortExec: expr=[o_custkey@3 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=11, partitioning: Hash([o_custkey@3], 16)
      SortExec: expr=[c_custkey@0 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=12, partitioning: Hash([c_custkey@0], 16)

=== Stage 14 ===
SortShuffleWriterExec: partitioning=Hash([s_nationkey@2], 16)
  ProjectionExec: expr=[l_extendedprice@0 as l_extendedprice, l_discount@1 as l_discount, s_nationkey@2 as s_nationkey, o_orderdate@3 as o_orderdate, n_regionkey@6 as n_regionkey]
    ProjectionExec: expr=[l_extendedprice@2 as l_extendedprice, l_discount@3 as l_discount, s_nationkey@4 as s_nationkey, o_orderdate@5 as o_orderdate, c_nationkey@6 as c_nationkey, n_nationkey@0 as n_nationkey, n_regionkey@1 as n_regionkey]
      HashJoinExec: mode=CollectLeft, join_type=Inner, on=[(n_nationkey@0, c_nationkey@4)]
        UnresolvedShuffleExec: stage=4, broadcast=true, upstream_partitions: 16
        UnresolvedShuffleExec: stage=13, partitioning: Hash([c_nationkey@4], 16)

=== Stage 15 ===
ShuffleWriterExec: partitioning: None
  UnresolvedShuffleExec: stage=14, partitioning: Hash([s_nationkey@2], 16)

=== Stage 16 ===
SortShuffleWriterExec: partitioning=Hash([n_nationkey@0], 16)
  StatsExec: rows=25

=== Stage 17 ===
SortShuffleWriterExec: partitioning=Hash([n_regionkey@3], 16)
  ProjectionExec: expr=[l_extendedprice@0 as l_extendedprice, l_discount@1 as l_discount, o_orderdate@3 as o_orderdate, n_regionkey@4 as n_regionkey, n_name@6 as n_name]
    HashJoinExec: mode=CollectLeft, join_type=Inner, on=[(s_nationkey@2, n_nationkey@0)]
      UnresolvedShuffleExec: stage=15, broadcast=true, upstream_partitions: 16
      UnresolvedShuffleExec: stage=16, partitioning: Hash([n_nationkey@0], 16)

=== Stage 18 ===
SortShuffleWriterExec: partitioning=Hash([o_year@0], 16)
  AggregateExec: mode=Partial, gby=[o_year@0 as o_year], aggr=[sum(CASE WHEN all_nations.nation = BRAZIL THEN all_nations.volume ELSE Some(0),38,4 END) as sum(CASE WHEN all_nations.nation = Utf8("BRAZIL") THEN all_nations.volume ELSE Int64(0) END), sum(all_nations.volume)]
    ProjectionExec: expr=[date_part(YEAR, o_orderdate@2) as o_year, l_extendedprice@0 * (Some(1),20,0 - l_discount@1) as volume, n_name@4 as nation]
      ProjectionExec: expr=[l_extendedprice@1 as l_extendedprice, l_discount@2 as l_discount, o_orderdate@3 as o_orderdate, n_regionkey@4 as n_regionkey, n_name@5 as n_name, r_regionkey@0 as r_regionkey]
        HashJoinExec: mode=CollectLeft, join_type=Inner, on=[(r_regionkey@0, n_regionkey@3)]
          UnresolvedShuffleExec: stage=2, broadcast=true, upstream_partitions: 16
          UnresolvedShuffleExec: stage=17, partitioning: Hash([n_regionkey@3], 16)

=== Stage 19 ===
ShuffleWriterExec: partitioning: None
  SortExec: expr=[o_year@0 ASC NULLS LAST], preserve_partitioning=[true]
    ProjectionExec: expr=[o_year@0 as o_year, sum(CASE WHEN all_nations.nation = Utf8("BRAZIL") THEN all_nations.volume ELSE Int64(0) END)@1 / sum(all_nations.volume)@2 as mkt_share]
      AggregateExec: mode=FinalPartitioned, gby=[o_year@0 as o_year], aggr=[sum(CASE WHEN all_nations.nation = BRAZIL THEN all_nations.volume ELSE Some(0),38,4 END) as sum(CASE WHEN all_nations.nation = Utf8("BRAZIL") THEN all_nations.volume ELSE Int64(0) END), sum(all_nations.volume)]
        UnresolvedShuffleExec: stage=18, partitioning: Hash([o_year@0], 16)

=== Stage 20 ===
ShuffleWriterExec: partitioning: None
  SortPreservingMergeExec: [o_year@0 ASC NULLS LAST]
    UnresolvedShuffleExec: stage=19, partitioning: Hash([o_year@0], 16)
