== Abstract Syntax Tree ==
LogicalSink(table=[fluss.nexmark.output_8d7dd480576b4821843dd10cdf396a0e], fields=[bidder, bid_count, starttime, endtime])
+- LogicalProject(bidder=[$0], bid_count=[$2], starttime=[SESSION_START($1)], endtime=[SESSION_END($1)])
   +- LogicalAggregate(group=[{0, 1}], bid_count=[COUNT()])
      +- LogicalProject(bidder=[$1], $f1=[$SESSION($5, 10000:INTERVAL SECOND)])
         +- LogicalProject(auction=[$3.auction], bidder=[$3.bidder], price=[$3.price], channel=[$3.channel], url=[$3.url], dateTime=[$5], extra=[$3.extra])
            +- LogicalFilter(condition=[=($0, 2)])
               +- LogicalProject(event_type=[$0], person=[$1], auction=[$2], bid=[$3], dateTime=[$4], rowtime=[$5])
                  +- LogicalWatermarkAssigner(rowtime=[rowtime], watermark=[-($5, 4000:INTERVAL SECOND)])
                     +- LogicalProject(event_type=[$0], person=[$1], auction=[$2], bid=[$3], dateTime=[$4], rowtime=[TO_TIMESTAMP_LTZ($4, 3)])
                        +- LogicalTableScan(table=[[fluss, nexmark, events]])

== Optimized Physical Plan ==
Sink(table=[fluss.nexmark.output_8d7dd480576b4821843dd10cdf396a0e], fields=[bidder, bid_count, starttime, endtime])
+- Calc(select=[$f0 AS bidder, bid_count, w$start AS starttime, w$end AS endtime])
   +- GroupWindowAggregate(groupBy=[$f0], window=[SessionGroupWindow('w$, rowtime, 10000)], properties=[w$start, w$end, w$rowtime, w$proctime], select=[$f0, COUNT(*) AS bid_count, start('w$) AS w$start, end('w$) AS w$end, rowtime('w$) AS w$rowtime, proctime('w$) AS w$proctime])
      +- Exchange(distribution=[hash[$f0]])
         +- Calc(select=[bid.bidder AS $f0, Reinterpret(TO_TIMESTAMP_LTZ(dateTime, 3)) AS rowtime], where=[=(event_type, 2)])
            +- TableSourceScan(table=[[fluss, nexmark, events, project=[event_type, bid, dateTime], watermark=[-(TO_TIMESTAMP_LTZ(dateTime, 3), 4000:INTERVAL SECOND)], watermarkEmitStrategy=[on-periodic], filter=[]]], fields=[event_type, bid, dateTime])

== Optimized Execution Plan ==
Sink(table=[fluss.nexmark.output_8d7dd480576b4821843dd10cdf396a0e], fields=[bidder, bid_count, starttime, endtime])
+- Calc(select=[$f0 AS bidder, bid_count, w$start AS starttime, w$end AS endtime])
   +- GroupWindowAggregate(groupBy=[$f0], window=[SessionGroupWindow('w$, rowtime, 10000)], properties=[w$start, w$end, w$rowtime, w$proctime], select=[$f0, COUNT(*) AS bid_count, start('w$) AS w$start, end('w$) AS w$end, rowtime('w$) AS w$rowtime, proctime('w$) AS w$proctime])
      +- Exchange(distribution=[hash[$f0]])
         +- Calc(select=[bid.bidder AS $f0, Reinterpret(TO_TIMESTAMP_LTZ(dateTime, 3)) AS rowtime], where=[(event_type = 2)])
            +- TableSourceScan(table=[[fluss, nexmark, events, project=[event_type, bid, dateTime], watermark=[-(TO_TIMESTAMP_LTZ(dateTime, 3), 4000:INTERVAL SECOND)], watermarkEmitStrategy=[on-periodic], filter=[]]], fields=[event_type, bid, dateTime])

== Physical Execution Plan ==
{
  "nodes" : [ {
    "id" : 2271,
    "type" : "Source: events[1601]",
    "pact" : "Data Source",
    "contents" : "[1601]:TableSourceScan(table=[[fluss, nexmark, events, project=[event_type, bid, dateTime], watermark=[-(TO_TIMESTAMP_LTZ(dateTime, 3), 4000:INTERVAL SECOND)], watermarkEmitStrategy=[on-periodic], filter=[]]], fields=[event_type, bid, dateTime])",
    "parallelism" : 4
  }, {
    "id" : 2272,
    "type" : "Calc[1602]",
    "pact" : "Operator",
    "contents" : "[1602]:Calc(select=[bid.bidder AS $f0, Reinterpret(TO_TIMESTAMP_LTZ(dateTime, 3)) AS rowtime], where=[(event_type = 2)])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 2271,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 2274,
    "type" : "GroupWindowAggregate[1604]",
    "pact" : "Operator",
    "contents" : "[1604]:GroupWindowAggregate(groupBy=[$f0], window=[SessionGroupWindow('w$, rowtime, 10000)], properties=[w$start, w$end, w$rowtime, w$proctime], select=[$f0, COUNT(*) AS bid_count, start('w$) AS w$start, end('w$) AS w$end, rowtime('w$) AS w$rowtime, proctime('w$) AS w$proctime])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 2272,
      "ship_strategy" : "HASH",
      "side" : "second"
    } ]
  }, {
    "id" : 2275,
    "type" : "Calc[1605]",
    "pact" : "Operator",
    "contents" : "[1605]:Calc(select=[$f0 AS bidder, bid_count, w$start AS starttime, w$end AS endtime])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 2274,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 2278,
    "type" : "Sink(nexmark.output_8d7dd480576b4821843dd10cdf396a0e): Writer",
    "pact" : "Operator",
    "contents" : "Sink(nexmark.output_8d7dd480576b4821843dd10cdf396a0e): Writer",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 2275,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}