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

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

=== Stage 3 ===
SortShuffleWriterExec: partitioning=Hash([p_partkey@0], 16)
  FilterExec: p_name@1 LIKE %green%, projection=[p_partkey@0]
    StatsExec: rows=20000000

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

=== Stage 5 ===
SortShuffleWriterExec: partitioning=Hash([l_suppkey@2], 16)
  ProjectionExec: expr=[l_orderkey@1 as l_orderkey, l_partkey@2 as l_partkey, l_suppkey@3 as l_suppkey, l_quantity@4 as l_quantity, l_extendedprice@5 as l_extendedprice, l_discount@6 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=3, partitioning: Hash([p_partkey@0], 16)
      SortExec: expr=[l_partkey@1 ASC], preserve_partitioning=[true]
        UnresolvedShuffleExec: stage=4, partitioning: Hash([l_partkey@1], 16)

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

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

=== Stage 8 ===
SortShuffleWriterExec: partitioning=Hash([ps_suppkey@1, ps_partkey@0], 16)
  StatsExec: rows=80000000

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

=== Stage 10 ===
SortShuffleWriterExec: partitioning=Hash([o_orderkey@0], 16)
  StatsExec: rows=150000000

=== Stage 11 ===
SortShuffleWriterExec: partitioning=Hash([s_nationkey@3], 16)
  ProjectionExec: expr=[l_quantity@1 as l_quantity, l_extendedprice@2 as l_extendedprice, l_discount@3 as l_discount, s_nationkey@4 as s_nationkey, ps_supplycost@5 as ps_supplycost, o_orderdate@7 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([nation@0, o_year@1], 16)
  AggregateExec: mode=Partial, gby=[nation@0 as nation, o_year@1 as o_year], aggr=[sum(profit.amount)]
    ProjectionExec: expr=[n_name@7 as nation, date_part(YEAR, o_orderdate@5) as o_year, l_extendedprice@1 * (Some(1),20,0 - l_discount@2) - ps_supplycost@4 * l_quantity@0 as amount]
      ProjectionExec: expr=[l_quantity@2 as l_quantity, l_extendedprice@3 as l_extendedprice, l_discount@4 as l_discount, s_nationkey@5 as s_nationkey, ps_supplycost@6 as ps_supplycost, o_orderdate@7 as o_orderdate, n_nationkey@0 as n_nationkey, n_name@1 as n_name]
        HashJoinExec: mode=CollectLeft, join_type=Inner, on=[(n_nationkey@0, s_nationkey@3)]
          UnresolvedShuffleExec: stage=2, broadcast=true, upstream_partitions: 16
          UnresolvedShuffleExec: stage=11, partitioning: Hash([s_nationkey@3], 16)

=== Stage 13 ===
ShuffleWriterExec: partitioning: None
  SortExec: expr=[nation@0 ASC NULLS LAST, o_year@1 DESC], preserve_partitioning=[true]
    ProjectionExec: expr=[nation@0 as nation, o_year@1 as o_year, sum(profit.amount)@2 as sum_profit]
      AggregateExec: mode=FinalPartitioned, gby=[nation@0 as nation, o_year@1 as o_year], aggr=[sum(profit.amount)]
        UnresolvedShuffleExec: stage=12, partitioning: Hash([nation@0, o_year@1], 16)

=== Stage 14 ===
ShuffleWriterExec: partitioning: None
  SortPreservingMergeExec: [nation@0 ASC NULLS LAST, o_year@1 DESC]
    UnresolvedShuffleExec: stage=13, partitioning: Hash([nation@0, o_year@1], 16)
