== Abstract Syntax Tree ==
LogicalSink(table=[default_catalog.default_database.sink], fields=[auction, bidder, price, channel, url, dateTime, extra, rank_number])
+- LogicalProject(auction=[$0], bidder=[$1], price=[$2], channel=[$3], url=[$4], dateTime=[$5], extra=[$6], rank_number=[$7])
   +- LogicalFilter(condition=[<=($7, 10)])
      +- LogicalProject(auction=[$0], bidder=[$1], price=[$2], channel=[$3], url=[$4], dateTime=[$5], extra=[$6], rank_number=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)])
         +- 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=[2017])
+- NativeCalc(reuseBarrier=[2016])
   +- NativeColumnarTopN(reuseBarrier=[2015])
      +- NativeColumnarExchange(reuseBarrier=[2014])
         +- NativeCalc(reuseBarrier=[2013])
            +- NativeKafkaDecode(topic=[nexmark], format=[json], watermarkColumn=[dateTime], watermarkExpression=[-(TO_TIMESTAMP_LTZ($4, 3), 4000:INTERVAL SECOND)], reuseBarrier=[2012])

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

== Physical Execution Plan ==
{
  "nodes" : [ {
    "id" : 5312,
    "type" : "Source: native-kafka-source",
    "pact" : "Data Source",
    "contents" : "Source: native-kafka-source",
    "parallelism" : 4
  }, {
    "id" : 5313,
    "type" : "NativeCalcExecNode[2412]",
    "pact" : "Operator",
    "contents" : "[2412]:NativeCalc",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5312,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 5314,
    "type" : "NativeColumnarExchangeExecNode[2413]",
    "pact" : "Operator",
    "contents" : "[2413]:NativeColumnarExchange",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5313,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 5316,
    "type" : "NativeColumnarTopNExecNode[2414]",
    "pact" : "Operator",
    "contents" : "[2414]:NativeColumnarTopN",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5314,
      "ship_strategy" : "columnar-key-group",
      "side" : "second"
    } ]
  }, {
    "id" : 5317,
    "type" : "NativeCalcExecNode[2415]",
    "pact" : "Operator",
    "contents" : "[2415]:NativeCalc",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5316,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 5318,
    "type" : "native-paimon-not-null-enforcer",
    "pact" : "Operator",
    "contents" : "native-paimon-not-null-enforcer",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5317,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 5319,
    "type" : "native-paimon-bucket-route",
    "pact" : "Operator",
    "contents" : "native-paimon-bucket-route",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5318,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  }, {
    "id" : 5321,
    "type" : "Writer : table",
    "pact" : "Operator",
    "contents" : "Writer : table",
    "parallelism" : 4,
    "predecessors" : [ {
      "id" : 5319,
      "ship_strategy" : "shuffle by bucket",
      "side" : "second"
    } ]
  }, {
    "id" : 5322,
    "type" : "Global Committer : table",
    "pact" : "Operator",
    "contents" : "Global Committer : table",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 5321,
      "ship_strategy" : "REBALANCE",
      "side" : "second"
    } ]
  }, {
    "id" : 5326,
    "type" : "end: Writer",
    "pact" : "Operator",
    "contents" : "end: Writer",
    "parallelism" : 1,
    "predecessors" : [ {
      "id" : 5322,
      "ship_strategy" : "FORWARD",
      "side" : "second"
    } ]
  } ]
}