== Abstract Syntax Tree ==
LogicalSink(table=[default_catalog.default_database.sink], fields=[bidder, bid_count, starttime, endtime])
+- LogicalProject(bidder=[$0], bid_count=[$3], starttime=[$1], endtime=[$2])
   +- LogicalAggregate(group=[{0, 1, 2}], bid_count=[COUNT()])
      +- LogicalProject(bidder=[$1], starttime=[$8], endtime=[$9])
         +- LogicalTableFunctionScan(invocation=[TUMBLE(TABLE(#0), DESCRIPTOR(_UTF-16LE'p_time'), 10000:INTERVAL SECOND)], rowType=[RecordType(BIGINT auction, BIGINT bidder, BIGINT price, VARCHAR(2147483647) channel, VARCHAR(2147483647) url, TIMESTAMP_LTZ(3) *ROWTIME* dateTime, VARCHAR(2147483647) extra, TIMESTAMP_LTZ(3) *PROCTIME* p_time, TIMESTAMP(3) window_start, TIMESTAMP(3) window_end, TIMESTAMP_LTZ(3) *PROCTIME* window_time)])
            +- LogicalProject(auction=[$0], bidder=[$1], price=[$2], channel=[$3], url=[$4], dateTime=[$5], extra=[$6], p_time=[$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)])
                        +- 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 ==
NativePaimonSink(reuseBarrier=[1609])
+- NativeColumnarWindowAggregate(reuseBarrier=[1608])
   +- NativeColumnarExchange(reuseBarrier=[1607])
      +- NativeCalc(reuseBarrier=[1606])
         +- NativeKafkaDecode(topic=[nexmark], format=[json], watermarkColumn=[dateTime], watermarkExpression=[-(TO_TIMESTAMP_LTZ($4, 3), 4000:INTERVAL SECOND)], reuseBarrier=[1605])

== Optimized Execution Plan ==
NativePaimonSink
+- NativeColumnarWindowAggregate
   +- NativeColumnarExchange
      +- NativeCalc
         +- NativeKafkaDecode(topic=[nexmark], format=[json], watermarkColumn=[dateTime], watermarkExpression=[-(TO_TIMESTAMP_LTZ($4, 3), 4000:INTERVAL SECOND)])

== Physical Execution Plan ==
{
  "nodes" : [ {
    "id" : 3269,
    "type" : "Source: native-kafka-source",
    "pact" : "Data Source",
    "contents" : "Source: native-kafka-source",
    "parallelism" : 4
  }, {
    "id" : 3270,
    "type" : "NativeCalcExecNode[1578]",
    "pact" : "Operator",
    "contents" : "[1578]:NativeCalc",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3269,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3271,
    "type" : "NativeColumnarExchangeExecNode[1579]",
    "pact" : "Operator",
    "contents" : "[1579]:NativeColumnarExchange",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3270,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3273,
    "type" : "NativeColumnarWindowAggExecNode[1580]",
    "pact" : "Operator",
    "contents" : "[1580]:NativeColumnarWindowAggregate",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3271,
      "ship_strategy" : "columnar-key-group",
      "side" : "second"
    } ]
  }, {
    "id" : 3274,
    "type" : "native-paimon-bucket-route",
    "pact" : "Operator",
    "contents" : "native-paimon-bucket-route",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3273,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3276,
    "type" : "Writer : table",
    "pact" : "Operator",
    "contents" : "Writer : table",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3274,
      "ship_strategy" : "shuffle by bucket",
      "side" : "second"
    } ]
  }, {
    "id" : 3277,
    "type" : "Global Committer : table",
    "pact" : "Operator",
    "contents" : "Global Committer : table",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 3276,
      "ship_strategy" : "REBALANCE",
      "side" : "second"
    } ]
  }, {
    "id" : 3281,
    "type" : "end: Writer",
    "pact" : "Operator",
    "contents" : "end: Writer",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 3277,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}