== Abstract Syntax Tree ==
LogicalSink(table=[fluss.nexmark.output_34597288e158473693fc451bd9d81915], fields=[auction, price, val])
+- LogicalProject(auction=[$0], price=[$2], val=[$9])
   +- LogicalCorrelate(correlation=[$cor0], joinType=[inner], requiredColumns=[{0, 7}])
      :- LogicalProject(auction=[$0], bidder=[$1], price=[$2], channel=[$3], url=[$4], dateTime=[$5], extra=[$6], p_time=[PROCTIME()])
      :  +- 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]])
      +- LogicalFilter(condition=[=(CAST(MOD($cor0.auction, 5)):BIGINT, $0)])
         +- LogicalSnapshot(period=[$cor0.p_time])
            +- LogicalTableScan(table=[[default_catalog, default_database, dim]])

== Optimized Physical Plan ==
Sink(table=[fluss.nexmark.output_34597288e158473693fc451bd9d81915], fields=[auction, price, val])
+- Calc(select=[auction, price, val])
   +- LookupJoin(table=[default_catalog.default_database.dim], joinType=[InnerJoin], lookup=[k=$f8], select=[auction, price, $f8, k, val])
      +- Calc(select=[bid.auction AS auction, bid.price AS price, CAST(MOD(bid.auction, 5) AS BIGINT) AS $f8], 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_34597288e158473693fc451bd9d81915], fields=[auction, price, val])
+- Calc(select=[auction, price, val])
   +- LookupJoin(table=[default_catalog.default_database.dim], joinType=[InnerJoin], lookup=[k=$f8], select=[auction, price, $f8, k, val])
      +- Calc(select=[bid.auction AS auction, bid.price AS price, CAST(MOD(bid.auction, 5) AS BIGINT) AS $f8], 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" : 3983,
    "type" : "Source: events[2531]",
    "pact" : "Data Source",
    "contents" : "[2531]: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" : 3984,
    "type" : "Calc[2532]",
    "pact" : "Operator",
    "contents" : "[2532]:Calc(select=[bid.auction AS auction, bid.price AS price, CAST(MOD(bid.auction, 5) AS BIGINT) AS $f8], where=[(event_type = 2)])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3983,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3985,
    "type" : "LookupJoin[2533]",
    "pact" : "Operator",
    "contents" : "[2533]:LookupJoin(table=[default_catalog.default_database.dim], joinType=[InnerJoin], lookup=[k=$f8], select=[auction, price, $f8, k, val])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3984,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3986,
    "type" : "Calc[2534]",
    "pact" : "Operator",
    "contents" : "[2534]:Calc(select=[auction, price, val])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3985,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3988,
    "type" : "Sink(nexmark.output_34597288e158473693fc451bd9d81915): Writer",
    "pact" : "Operator",
    "contents" : "Sink(nexmark.output_34597288e158473693fc451bd9d81915): Writer",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3986,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}