== Abstract Syntax Tree ==
LogicalSink(table=[default_catalog.default_database.sink], fields=[auction, bidder, price, dateTime, extra])
+- LogicalProject(auction=[$0], bidder=[$1], price=[$2], dateTime=[$5], extra=[$6])
   +- 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)])
         +- 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=[[default_catalog, default_database, src]])

== Optimized Physical Plan ==
Sink(table=[default_catalog.default_database.sink], fields=[auction, bidder, price, dateTime, extra])
+- Calc(select=[bid.auction AS auction, bid.bidder AS bidder, bid.price AS price, Reinterpret(TO_TIMESTAMP_LTZ(dateTime, 3)) AS dateTime, bid.extra AS extra], where=[=(event_type, 2)])
   +- TableSourceScan(table=[[default_catalog, default_database, src, watermark=[-(TO_TIMESTAMP_LTZ(dateTime, 3), 4000:INTERVAL SECOND)], watermarkEmitStrategy=[on-periodic]]], fields=[event_type, person, auction, bid, dateTime])

== Optimized Execution Plan ==
Sink(table=[default_catalog.default_database.sink], fields=[auction, bidder, price, dateTime, extra])
+- Calc(select=[bid.auction AS auction, bid.bidder AS bidder, bid.price AS price, Reinterpret(TO_TIMESTAMP_LTZ(dateTime, 3)) AS dateTime, bid.extra AS extra], where=[(event_type = 2)])
   +- TableSourceScan(table=[[default_catalog, default_database, src, watermark=[-(TO_TIMESTAMP_LTZ(dateTime, 3), 4000:INTERVAL SECOND)], watermarkEmitStrategy=[on-periodic]]], fields=[event_type, person, auction, bid, dateTime])

== Physical Execution Plan ==
{
  "nodes" : [ {
    "id" : 43,
    "type" : "Source: src[17]",
    "pact" : "Data Source",
    "contents" : "[17]:TableSourceScan(table=[[default_catalog, default_database, src, watermark=[-(TO_TIMESTAMP_LTZ(dateTime, 3), 4000:INTERVAL SECOND)], watermarkEmitStrategy=[on-periodic]]], fields=[event_type, person, auction, bid, dateTime])",
    "parallelism" : 4
  }, {
    "id" : 44,
    "type" : "Calc[18]",
    "pact" : "Operator",
    "contents" : "[18]:Calc(select=[bid.auction AS auction, bid.bidder AS bidder, bid.price AS price, Reinterpret(TO_TIMESTAMP_LTZ(dateTime, 3)) AS dateTime, bid.extra AS extra], where=[(event_type = 2)])",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 43,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 45,
    "type" : "StreamRecordTimestampInserter[19]",
    "pact" : "Operator",
    "contents" : "[19]:StreamRecordTimestampInserter(rowtime field: 3)",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 44,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 46,
    "type" : "Map",
    "pact" : "Operator",
    "contents" : "Map",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 45,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 48,
    "type" : "Writer : table",
    "pact" : "Operator",
    "contents" : "Writer : table",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 46,
      "ship_strategy" : "shuffle by bucket",
      "side" : "second"
    } ]
  }, {
    "id" : 49,
    "type" : "Global Committer : table",
    "pact" : "Operator",
    "contents" : "Global Committer : table",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 48,
      "ship_strategy" : "REBALANCE",
      "side" : "second"
    } ]
  }, {
    "id" : 52,
    "type" : "end: Writer",
    "pact" : "Operator",
    "contents" : "end: Writer",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 49,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}