== 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=[1589])
+- NativeColumnarWindowAggregate(reuseBarrier=[1588])
   +- NativeColumnarExchange(reuseBarrier=[1587])
      +- NativeCalc(reuseBarrier=[1586])
         +- NativeKafkaDecode(topic=[nexmark], format=[json], watermarkColumn=[dateTime], watermarkExpression=[-(TO_TIMESTAMP_LTZ($4, 3), 4000:INTERVAL SECOND)], reuseBarrier=[1585])

== 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" : 3161,
    "type" : "Source: native-kafka-source",
    "pact" : "Data Source",
    "contents" : "Source: native-kafka-source",
    "parallelism" : 4
  }, {
    "id" : 3162,
    "type" : "NativeCalcExecNode[1530]",
    "pact" : "Operator",
    "contents" : "[1530]:NativeCalc",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3161,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3163,
    "type" : "NativeColumnarExchangeExecNode[1531]",
    "pact" : "Operator",
    "contents" : "[1531]:NativeColumnarExchange",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3162,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3165,
    "type" : "NativeColumnarWindowAggExecNode[1532]",
    "pact" : "Operator",
    "contents" : "[1532]:NativeColumnarWindowAggregate",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3163,
      "ship_strategy" : "columnar-key-group",
      "side" : "second"
    } ]
  }, {
    "id" : 3166,
    "type" : "native-paimon-bucket-route",
    "pact" : "Operator",
    "contents" : "native-paimon-bucket-route",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3165,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 3168,
    "type" : "Writer : table",
    "pact" : "Operator",
    "contents" : "Writer : table",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 3166,
      "ship_strategy" : "shuffle by bucket",
      "side" : "second"
    } ]
  }, {
    "id" : 3169,
    "type" : "Global Committer : table",
    "pact" : "Operator",
    "contents" : "Global Committer : table",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 3168,
      "ship_strategy" : "REBALANCE",
      "side" : "second"
    } ]
  }, {
    "id" : 3173,
    "type" : "end: Writer",
    "pact" : "Operator",
    "contents" : "end: Writer",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 3169,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}