
Group[@0]
  Logical Expressions:
    [1] id:185#0 | cost=null | estRows=10,800,000,000 | children=[] | LogicalFileScan ( qualified=truewatch_iceberg_rest_4809.variant_truewatch_60d_pk_20260805_probe_perf5d_b128_range_sp4096.browser_access_pk_variant_unshredded, output=[event_date#15, event_time#16, event_time_ms#17, event_id#18, source#19, dw_keyword#20, load_version#21, message#22, _row_id#23, _last_updated_sequence_number#24], operativeCols=[event_date#15, message#22] )
  Physical Expressions:
    [1] id:264#0 | cost=54,000,000,000 [cpu=54,000,000,000, mem=0, net=0] | estRows=-1 | children=[] | PhysicalFileScan[265]@0 ( table=browser_access_pk_variant_unshredded, stats=null, qualified=truewatch_iceberg_rest_4809.variant_truewatch_60d_pk_20260805_probe_perf5d_b128_range_sp4096.browser_access_pk_variant_unshredded, selected partitions num=0, operativeCols=[event_date#15, message#22] )
  Enforcers:
    (none)
  Statistics
    rows=1.08E10
    tupleSize=70.0
    width=1
    event_date#15 -> ndv=60.0000, min=20260601000000.000000(2026-06-01), max=20260730000000.000000(2026-07-30), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    event_time#16 -> ndv=5250066432.0000, min=20260601080000.000000(2026-06-01 08:00:00.000000), max=20260731075959.000000(2026-07-31 07:59:59.999000), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_time_ms#17 -> ndv=5247328768.0000, min=1780272000000.000000(1780272000000), max=1785455999999.000000(1785455999999), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_id#18 -> ndv=10774758400.0000, min=32199684108857392.000000(req-0000000076b7ae98), max=32199684112410216.000000(req-ffffffffb0ebb403), count=10800000000.0000, numNulls=0.0000, avgSizeByte=20.000000, hotValues=(null)
    source#19 -> ndv=1.0000, min=27710370788631920.000000(browser-rum), max=27710370788631920.000000(browser-rum), count=10800000000.0000, numNulls=0.0000, avgSizeByte=11.000000, hotValues=(null)
    dw_keyword#20 -> ndv=1.0000, min=27710370788631920.000000(browser_access_log), max=27710370788631920.000000(browser_access_log), count=10800000000.0000, numNulls=0.0000, avgSizeByte=18.000000, hotValues=(null)
    load_version#21 -> ndv=1.0000, min=1.000000(1), max=1.000000(1), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    message#22 -> unknown(1.08E10)
    _row_id#23 -> unknown(1.08E10)
    _last_updated_sequence_number#24 -> unknown(1.08E10)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: ANY
    Expression ID: 264#0
    ── Entry #2 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 264#0
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@1]
  Logical Expressions:
    [1] id:188#1 | cost=null | estRows=180,000,000 | children=[@0] | LogicalFilter[189] ( predicates=(event_date#15 = 2026-06-15) )
  Physical Expressions:
    [1] id:261#1 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@0] | PhysicalFilter[262]@1 ( stats=null, predicates=(event_date#15 = 2026-06-15) )
  Enforcers:
    (none)
  Statistics
    rows=1.8E8
    tupleSize=70.0
    width=1
    event_date#15 -> ndv=1.0000, min=20260615000000.000000(2026-06-15), max=20260615000000.000000(2026-06-15), count=0.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(2026-06-15:100.0)
    event_time#16 -> ndv=180000000.0000, min=20260601080000.000000(2026-06-01 08:00:00.000000), max=20260731075959.000000(2026-07-31 07:59:59.999000), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_time_ms#17 -> ndv=180000000.0000, min=1780272000000.000000(1780272000000), max=1785455999999.000000(1785455999999), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_id#18 -> ndv=180000000.0000, min=32199684108857392.000000(req-0000000076b7ae98), max=32199684112410216.000000(req-ffffffffb0ebb403), count=10800000000.0000, numNulls=0.0000, avgSizeByte=20.000000, hotValues=(null)
    source#19 -> ndv=1.0000, min=27710370788631920.000000(browser-rum), max=27710370788631920.000000(browser-rum), count=10800000000.0000, numNulls=0.0000, avgSizeByte=11.000000, hotValues=(null)
    dw_keyword#20 -> ndv=1.0000, min=27710370788631920.000000(browser_access_log), max=27710370788631920.000000(browser_access_log), count=10800000000.0000, numNulls=0.0000, avgSizeByte=18.000000, hotValues=(null)
    load_version#21 -> ndv=1.0000, min=1.000000(1), max=1.000000(1), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    message#22 -> unknown(1.08E10)
    _row_id#23 -> unknown(1.08E10)
    _last_updated_sequence_number#24 -> unknown(1.08E10)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: ANY
    Expression ID: 261#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 261#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@2]
  Logical Expressions:
    [1] id:191#2 | cost=null | estRows=180,000,000 | children=[@1] | LogicalProject[192] ( distinct=false, projects=[cast(element_at(message#22, 'mainDomain') as TEXT) AS `domain`#25] )
  Physical Expressions:
    [1] id:256#2 | cost=3.2 [cpu=3.2, mem=0, net=0] | estRows=-1 | children=[@1] | PhysicalProject[257]@2 ( stats=null, projects=[cast(element_at(message#22, 'mainDomain') as TEXT) AS `domain`#25] )
  Enforcers:
    [1] id:288#2 | cost=62,700,000 [cpu=60,000,000, mem=0, net=1,800,000] | estRows=180,000,000 | children=[@2] | PhysicalDistribute[289]@2 ( stats=null, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) )
  Statistics
    rows=1.8E8
    tupleSize=1.0
    width=1
    domain#25 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,003.2
    Properties: ANY
    Expression ID: 256#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 54,000,000,003.2
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 256#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,062,700,003.2
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    Expression ID: 288#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #4 ──────────────────────────────
    Cost: 54,062,700,003.2
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    Expression ID: 288#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@3]
  Logical Expressions:
    [1] id:194#3 | cost=null | estRows=60,000,000 | children=[@2] | LogicalAggregate[195] ( groupByExpr=[domain#25], outputExpr=[domain#25, count(*) AS `visits`#26], hasRepeat=false )
    [2] id:324#3 | cost=null | estRows=160 | children=[@12] | LogicalProject[325] ( distinct=false, projects=[main_domain#30 AS `domain`#25, sum(visit_count)#34 AS `visits`#26] )
  Physical Expressions:
    [1] id:245#3 | cost=120,000,000 [cpu=60,000,000, mem=60,000,000, net=0] | estRows=-1 | children=[@2] | PhysicalHashAggregate[246]@3 ( stats=null, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[domain#25], outputExpr=[domain#25, count(*) AS `visits`#26], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [2] id:251#3 | cost=40,000,000.02 [cpu=20,000,000.02, mem=20,000,000, net=0] | estRows=20,000,000 | children=[@9] | PhysicalHashAggregate[252]@3 ( stats=null, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[domain#25], outputExpr=[domain#25, count(partial_count(*)#27) AS `visits`#26], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [3] id:329#3 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@12] | PhysicalProject[330]@3 ( stats=null, projects=[main_domain#30 AS `domain`#25, sum(visit_count)#34 AS `visits`#26] )
  Enforcers:
    [1] id:279#3 | cost=210,000,000 [cpu=60,000,000, mem=60,000,000, net=60,000,000] | estRows=60,000,000 | children=[@3] | PhysicalQuickSort[280]@3 ( stats=null, orderKeys=[visits#26 desc, domain#25 asc null first], phase=LOCAL_SORT )
    [2] id:282#3 | cost=900,000 [cpu=0, mem=0, net=600,000] | estRows=60,000,000 | children=[@3] | PhysicalDistribute[283]@3 ( stats=null, distributionSpec=DistributionSpecGather )
    [3] id:285#3 | cost=210,000,000 [cpu=60,000,000, mem=60,000,000, net=60,000,000] | estRows=60,000,000 | children=[@3] | PhysicalQuickSort[286]@3 ( stats=null, orderKeys=[visits#26 desc, domain#25 asc null first], phase=MERGE_SORT )
    [4] id:364#3 | cost=900,000 [cpu=0, mem=0, net=600,000] | estRows=60,000,000 | children=[@3] | PhysicalDistribute[365]@3 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Enforcer(ID, RequiredProperties):
      (0)367,  DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
      (1)364,  GATHER
      (2)361,  DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([visits#26 desc, domain#25 asc null first])
  Chosen Expression ID: 329
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
  Statistics
    rows=6.0E7
    tupleSize=9.0
    width=1
    domain#25 -> unknown(1.0)
    visits#26 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 801
    Properties: ANY
    Expression ID: 329#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    Expression ID: 329#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #3 ────────────────────────────── BEST
    Cost: 210,000,801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([visits#26 desc, domain#25 asc null first])
    Expression ID: 361#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    ── Entry #4 ────────────────────────────── BEST
    Cost: 210,900,801
    Properties: GATHER
    Expression ID: 364#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([visits#26 desc, domain#25 asc null first])
    ── Entry #5 ────────────────────────────── BEST
    Cost: 420,900,801
    Properties: DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    Expression ID: 367#3
    ChildrenRequires:
      [0] GATHER
    ── Entry #6 ──────────────────────────────
    Cost: 54,180,900,003.22
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    Expression ID: 251#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    ── Entry #7 ──────────────────────────────
    Cost: 54,390,900,003.22
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([visits#26 desc, domain#25 asc null first])
    Expression ID: 279#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@4]
  Logical Expressions:
    [1] id:197#4 | cost=null | estRows=60,000,000 | children=[@3] | LogicalWindow ( windowExpressions=[WindowExpression(row_number() spec(ORDER BY visits#26 desc, domain#25 asc null first ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)) AS `rn`#14], isChecked=true )
  Physical Expressions:
    [1] id:236#4 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@3] | PhysicalWindow[237]@4 ( stats=null, windowFrameGroup=(Funcs=[WindowExpression(row_number() spec(ORDER BY visits#26 desc, domain#25 asc null first ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)) AS `rn`#14], PartitionKeys=[], OrderKeys=[visits#26 desc, domain#25 asc null first], WindowFrame=WindowFrame(ROWS, UNBOUNDED_PRECEDING, CURRENT_ROW)), requiredProperties=followParentProperties )
  Enforcers:
    (none)
  Chosen Expression ID: 236
  Chosen Properties: DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
  Statistics
    rows=6.0E7
    tupleSize=10.0
    width=1
    rn#14 -> ndv=1.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=0.000000, hotValues=(null)
    domain#25 -> unknown(1.0)
    visits#26 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 420,900,801
    Properties: ANY
    Expression ID: 236#4
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 420,900,801
    Properties: DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    Expression ID: 236#4
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@5]
  Logical Expressions:
    [1] id:200#5 | cost=null | estRows=60,000,000 | children=[@4] | LogicalProject[201] ( distinct=false, projects=[domain#25 AS `domain`#12, visits#26 AS `visits`#13, rn#14] )
  Physical Expressions:
    [1] id:229#5 | cost=1 [cpu=1, mem=0, net=0] | estRows=-1 | children=[@4] | PhysicalProject[230]@5 ( stats=null, projects=[domain#25 AS `domain`#12, visits#26 AS `visits`#13, rn#14] )
  Enforcers:
    (none)
  Chosen Expression ID: 229
  Chosen Properties: DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
  Statistics
    rows=6.0E7
    tupleSize=10.0
    width=1
    domain#12 -> unknown(1.0)
    visits#13 -> unknown(1.0)
    rn#14 -> ndv=1.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=0.000000, hotValues=(null)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 420,900,802
    Properties: ANY
    Expression ID: 229#5
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 420,900,802
    Properties: DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    Expression ID: 229#5
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    ── Entry #3 ──────────────────────────────
    Cost: 420,900,802
    Properties: GATHER
    Expression ID: 229#5
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@6]
  Logical Expressions:
    [1] id:203#6 | cost=null | estRows=60,000,000 | children=[@5] | LogicalSort[204] ( orderKeys=[rn#14 asc null first] )
  Physical Expressions:
    [1] id:221#6 | cost=210,000,000 [cpu=60,000,000, mem=60,000,000, net=60,000,000] | estRows=60,000,000 | children=[@8] | PhysicalQuickSort[222]@6 ( stats=null, orderKeys=[rn#14 asc null first], phase=MERGE_SORT )
    [2] id:224#6 | cost=6,150,000,000 [cpu=60,000,000, mem=6,000,000,000, net=60,000,000] | estRows=-1 | children=[@5] | PhysicalQuickSort[225]@6 ( stats=null, orderKeys=[rn#14 asc null first], phase=GATHER_SORT )
  Enforcers:
    (none)
  Chosen Expression ID: 221
  Chosen Properties: DistributionSpecGather Order: ([rn#14 asc null first])
  Statistics
    rows=6.0E7
    tupleSize=10.0
    width=1
    domain#12 -> unknown(1.0)
    visits#13 -> unknown(1.0)
    rn#14 -> ndv=1.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=0.000000, hotValues=(null)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 840,900,802
    Properties: ANY
    Expression ID: 221#6
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([rn#14 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 840,900,802
    Properties: DistributionSpecGather Order: ([rn#14 asc null first])
    Expression ID: 221#6
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([rn#14 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

ROOT Group[@7]
  Logical Expressions:
    [1] id:206#7 | cost=null | estRows=60,000,000 | children=[@6] | LogicalResultSink[207] ( outputExprs=[domain#12, visits#13, rn#14] )
  Physical Expressions:
    [1] id:211#7 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@6] | PhysicalResultSink[212] ( outputExprs=[domain#12, visits#13, rn#14] )
  Enforcers:
    (none)
  Chosen Expression ID: 211
  Chosen Properties: GATHER
  Statistics
    rows=6.0E7
    tupleSize=10.0
    width=1
    domain#12 -> unknown(1.0)
    visits#13 -> unknown(1.0)
    rn#14 -> ndv=1.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=0.000000, hotValues=(null)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 840,900,802
    Properties: ANY
    Expression ID: 211#7
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([rn#14 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 840,900,802
    Properties: GATHER
    Expression ID: 211#7
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([rn#14 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@8]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:218#8 | cost=210,000,000 [cpu=60,000,000, mem=60,000,000, net=60,000,000] | estRows=60,000,000 | children=[@5] | PhysicalQuickSort[219]@8 ( stats=null, orderKeys=[rn#14 asc null first], phase=LOCAL_SORT )
  Enforcers:
    (none)
  Chosen Expression ID: 218
  Chosen Properties: DistributionSpecGather Order: ([rn#14 asc null first])
  Statistics
    rows=6.0E7
    tupleSize=10.0
    width=1
    domain#12 -> unknown(1.0)
    visits#13 -> unknown(1.0)
    rn#14 -> ndv=1.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=0.000000, hotValues=(null)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 630,900,802
    Properties: ANY
    Expression ID: 218#8
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 630,900,802
    Properties: DistributionSpecGather Order: ([rn#14 asc null first])
    Expression ID: 218#8
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
    ── Entry #3 ──────────────────────────────
    Cost: 630,900,802
    Properties: GATHER
    Expression ID: 218#8
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([visits#26 desc, domain#25 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@9]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:248#9 | cost=120,000,000 [cpu=60,000,000, mem=60,000,000, net=0] | estRows=60,000,000 | children=[@2] | PhysicalHashAggregate[249]@9 ( stats=null, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[domain#25], outputExpr=[domain#25, partial_count(*) AS `partial_count(*)`#27], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    [1] id:276#9 | cost=20,900,000 [cpu=20,000,000, mem=0, net=600,000] | estRows=60,000,000 | children=[@9] | PhysicalDistribute[277]@9 ( stats=null, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) )
  Statistics
    rows=6.0E7
    tupleSize=9.0
    width=1
    domain#25 -> unknown(1.0)
    partial_count(*)#27 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,120,000,003.2
    Properties: ANY
    Expression ID: 248#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 54,120,000,003.2
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 248#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,140,900,003.2
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    Expression ID: 276#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #4 ──────────────────────────────
    Cost: 54,140,900,003.2
    Properties: DistributionSpecHash ( orderedShuffledColumns=[25], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[25]], exprIdToEquivalenceSet={25=0} ) Order: ([])
    Expression ID: 276#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@10]
  Logical Expressions:
    [1] id:315#10 | cost=null | estRows=480 | children=[] | LogicalOlapScan ( qualified=variant_perf_doris.mv_truewatch_spark_unshredded, indexName=mv_truewatch_spark_unshredded, selectedIndexId=1787172442939, preAgg=ON, operativeCol=[anomaly_count#33, event_date#28, main_domain#30, anomaly_type#31], virtualColumns=[] )
  Physical Expressions:
    [1] id:353#10 | cost=480 [cpu=480, mem=0, net=0] | estRows=-1 | children=[] | PhysicalOlapScan[354]@10 ( table=mv_truewatch_spark_unshredded, stats=null, operativeSlots=[anomaly_count#33, event_date#28, main_domain#30, anomaly_type#31], virtualColumns=[] )
  Enforcers:
    (none)
  Chosen Expression ID: 353
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
  Statistics
    rows=480.0
    tupleSize=6.0
    width=1
    event_date#28 -> unknown(480.0)
    event_hour#29 -> unknown(480.0)
    main_domain#30 -> unknown(480.0)
    anomaly_type#31 -> unknown(480.0)
    visit_count#32 -> unknown(480.0)
    anomaly_count#33 -> unknown(480.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 480
    Properties: ANY
    Expression ID: 353#10
    ── Entry #2 ────────────────────────────── BEST
    Cost: 480
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 353#10
    ── Entry #3 ──────────────────────────────
    Cost: 480
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 353#10
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@11]
  Logical Expressions:
    [1] id:318#11 | cost=null | estRows=480 | children=[@10] | LogicalProject[319] ( distinct=false, projects=[main_domain#30, visit_count#32] )
  Physical Expressions:
    [1] id:350#11 | cost=1 [cpu=1, mem=0, net=0] | estRows=-1 | children=[@10] | PhysicalProject[351]@11 ( stats=null, projects=[main_domain#30, visit_count#32] )
  Enforcers:
    (none)
  Chosen Expression ID: 350
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
  Statistics
    rows=480.0
    tupleSize=2.0
    width=1
    main_domain#30 -> unknown(480.0)
    visit_count#32 -> unknown(480.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 481
    Properties: ANY
    Expression ID: 350#11
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 481
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 350#11
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 481
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 350#11
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@12]
  Logical Expressions:
    [1] id:321#12 | cost=null | estRows=160 | children=[@11] | LogicalAggregate[322] ( groupByExpr=[main_domain#30], outputExpr=[main_domain#30, sum(visit_count#32) AS `sum(visit_count)`#34], hasRepeat=false )
  Physical Expressions:
    [1] id:338#12 | cost=320 [cpu=160, mem=160, net=0] | estRows=-1 | children=[@11] | PhysicalHashAggregate[339]@12 ( stats=null, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[main_domain#30], outputExpr=[main_domain#30, sum(visit_count#32) AS `sum(visit_count)`#34], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [2] id:344#12 | cost=106.69 [cpu=53.35, mem=53.33, net=0] | estRows=53.33 | children=[@13] | PhysicalHashAggregate[345]@12 ( stats=null, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[main_domain#30], outputExpr=[main_domain#30, sum(partial_sum(visit_count)#35) AS `sum(visit_count)`#34], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    (none)
  Chosen Expression ID: 338
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
  Statistics
    rows=6.0E7
    tupleSize=9.0
    width=1
    main_domain#30 -> unknown(480.0)
    sum(visit_count)#34 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 801
    Properties: ANY
    Expression ID: 338#12
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 338#12
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@13]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:341#13 | cost=320 [cpu=160, mem=160, net=0] | estRows=160 | children=[@11] | PhysicalHashAggregate[342]@13 ( stats=null, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[main_domain#30], outputExpr=[main_domain#30, partial_sum(visit_count#32) AS `partial_sum(visit_count)`#35], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    (none)
  Statistics
    rows=160.0
    tupleSize=9.0
    width=1
    main_domain#30 -> unknown(480.0)
    partial_sum(visit_count)#35 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 801
    Properties: ANY
    Expression ID: 341#13
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 341#13
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
    Expression ID: 341#13
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[30], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[30]], exprIdToEquivalenceSet={30=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}

========== OPTIMIZED PLAN ==========
PhysicalResultSink[462] ( outputExprs=[domain#12, visits#13, rn#14] )
+--PhysicalQuickSort[458]@6 ( stats=60,000,000, orderKeys=[rn#14 asc null first], phase=MERGE_SORT )
   +--PhysicalQuickSort[454]@8 ( stats=60,000,000, orderKeys=[rn#14 asc null first], phase=LOCAL_SORT )
      +--PhysicalProject[450]@5 ( stats=60,000,000, projects=[domain#25 AS `domain`#12, visits#26 AS `visits`#13, rn#14] )
         +--PhysicalWindow[446]@4 ( stats=60,000,000, windowFrameGroup=(Funcs=[WindowExpression(row_number() spec(ORDER BY visits#26 desc, domain#25 asc null first ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)) AS `rn`#14], PartitionKeys=[], OrderKeys=[visits#26 desc, domain#25 asc null first], WindowFrame=WindowFrame(ROWS, UNBOUNDED_PRECEDING, CURRENT_ROW)), requiredProperties=followParentProperties )
            +--PhysicalQuickSort[442]@3 ( stats=60,000,000, orderKeys=[visits#26 desc, domain#25 asc null first], phase=MERGE_SORT )
               +--PhysicalDistribute[438]@3 ( stats=60,000,000, distributionSpec=DistributionSpecGather )
                  +--PhysicalQuickSort[434]@3 ( stats=60,000,000, orderKeys=[visits#26 desc, domain#25 asc null first], phase=LOCAL_SORT )
                     +--PhysicalProject[430]@3 ( stats=60,000,000, projects=[main_domain#30 AS `domain`#25, sum(visit_count)#34 AS `visits`#26] )
                        +--PhysicalHashAggregate[426]@12 ( stats=60,000,000, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[main_domain#30], outputExpr=[main_domain#30, sum(visit_count#32) AS `sum(visit_count)`#34], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
                           +--PhysicalProject[422]@11 ( stats=480, projects=[main_domain#30, visit_count#32] )
                              +--PhysicalOlapScan[418]@10 ( table=mv_truewatch_spark_unshredded, stats=480, operativeSlots=[anomaly_count#33, event_date#28, main_domain#30, anomaly_type#31], virtualColumns=[] )

========== MATERIALIZATIONS ==========

MaterializedView
MaterializedViewRewriteSuccessAndChose:
 CBO.internal.variant_perf_doris.mv_truewatch_spark_unshredded chose

MaterializedViewRewriteSuccessButNotChose:

MaterializedViewRewriteFail:
