== 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=[1599])
+- NativeColumnarWindowAggregate(reuseBarrier=[1598])
   +- NativeColumnarExchange(reuseBarrier=[1597])
      +- NativeCalc(reuseBarrier=[1596])
         +- NativeKafkaDecode(topic=[nexmark], format=[json], watermarkColumn=[dateTime], watermarkExpression=[-(TO_TIMESTAMP_LTZ($4, 3), 4000:INTERVAL SECOND)], reuseBarrier=[1595])

== 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" : 3241,
    "type" : "Source: native-kafka-source",
    "pact" : "Data Source",
    "contents" : "Source: native-kafka-source",
    "parallelism" : 4
  }, {
    "id" : 3242,
    "type" : "NativeCalcExecNode[1566]",
    "pact" : "Operator",
    "contents" : "[1566]:NativeCalc",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3241,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3243,
    "type" : "NativeColumnarExchangeExecNode[1567]",
    "pact" : "Operator",
    "contents" : "[1567]:NativeColumnarExchange",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3242,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3245,
    "type" : "NativeColumnarWindowAggExecNode[1568]",
    "pact" : "Operator",
    "contents" : "[1568]:NativeColumnarWindowAggregate",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3243,
      "ship_strategy" : "columnar-key-group",
      "side" : "second"
    } ]
  }, {
    "id" : 3246,
    "type" : "native-paimon-bucket-route",
    "pact" : "Operator",
    "contents" : "native-paimon-bucket-route",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3245,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3248,
    "type" : "Writer : table",
    "pact" : "Operator",
    "contents" : "Writer : table",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3246,
      "ship_strategy" : "shuffle by bucket",
      "side" : "second"
    } ]
  }, {
    "id" : 3249,
    "type" : "Global Committer : table",
    "pact" : "Operator",
    "contents" : "Global Committer : table",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 3248,
      "ship_strategy" : "REBALANCE",
      "side" : "second"
    } ]
  }, {
    "id" : 3253,
    "type" : "end: Writer",
    "pact" : "Operator",
    "contents" : "end: Writer",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 3249,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}