
Group[@0]
  Logical Expressions:
    [1] id:93#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#0, event_time#1, event_time_ms#2, event_id#3, source#4, dw_keyword#5, load_version#6, message#7, _row_id#8, _last_updated_sequence_number#9], operativeCols=[event_date#0, message#7] )
  Physical Expressions:
    [1] id:162#0 | cost=54,000,000,000 [cpu=54,000,000,000, mem=0, net=0] | estRows=-1 | children=[] | PhysicalFileScan[163]@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#0, message#7] )
  Enforcers:
    (none)
  Chosen Expression ID: 162
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=1.08E10
    tupleSize=70.0
    width=1
    event_date#0 -> 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#1 -> 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#2 -> ndv=5247328768.0000, min=1780272000000.000000(1780272000000), max=1785455999999.000000(1785455999999), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_id#3 -> 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#4 -> 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#5 -> 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#6 -> ndv=1.0000, min=1.000000(1), max=1.000000(1), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    message#7 -> unknown(1.08E10)
    _row_id#8 -> unknown(1.08E10)
    _last_updated_sequence_number#9 -> unknown(1.08E10)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: ANY
    Expression ID: 162#0
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 162#0
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@1]
  Logical Expressions:
    [1] id:96#1 | cost=null | estRows=1,098,305,084.75 | children=[@0] | LogicalFilter[97] ( predicates=AND[(event_date#0 >= 2026-06-12),(event_date#0 <= 2026-06-18)] )
  Physical Expressions:
    [1] id:159#1 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@0] | PhysicalFilter[160]@1 ( stats=null, predicates=AND[(event_date#0 >= 2026-06-12),(event_date#0 <= 2026-06-18)] )
  Enforcers:
    (none)
  Chosen Expression ID: 159
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=1.0983050847457628E9
    tupleSize=70.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    event_time#1 -> ndv=1098305084.7458, 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#2 -> ndv=1098305084.7458, min=1780272000000.000000(1780272000000), max=1785455999999.000000(1785455999999), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_id#3 -> ndv=1098305084.7458, min=32199684108857392.000000(req-0000000076b7ae98), max=32199684112410216.000000(req-ffffffffb0ebb403), count=10800000000.0000, numNulls=0.0000, avgSizeByte=20.000000, hotValues=(null)
    source#4 -> 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#5 -> 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#6 -> ndv=1.0000, min=1.000000(1), max=1.000000(1), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    message#7 -> unknown(1.08E10)
    _row_id#8 -> unknown(1.08E10)
    _last_updated_sequence_number#9 -> unknown(1.08E10)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: ANY
    Expression ID: 159#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 159#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@2]
  Logical Expressions:
    [1] id:99#2 | cost=null | estRows=1,098,305,084.75 | children=[@1] | LogicalProject[100] ( distinct=false, projects=[event_date#0, cast(element_at(message#7, 'mainDomain') as TEXT) AS `domain`#10, cast(element_at(message#7, 'anomalyType') as TEXT) AS `anomaly_type`#11, cast(element_at(message#7, 'totalCostMs') as BIGINT) AS `cast(element_at(message, 'totalCostMs') as BIGINT)`#14] )
  Physical Expressions:
    [1] id:154#2 | cost=7.6 [cpu=7.6, mem=0, net=0] | estRows=-1 | children=[@1] | PhysicalProject[155]@2 ( stats=null, projects=[event_date#0, cast(element_at(message#7, 'mainDomain') as TEXT) AS `domain`#10, cast(element_at(message#7, 'anomalyType') as TEXT) AS `anomaly_type`#11, cast(element_at(message#7, 'totalCostMs') as BIGINT) AS `cast(element_at(message, 'totalCostMs') as BIGINT)`#14] )
  Enforcers:
    [1] id:177#2 | cost=558,305,084.75 [cpu=366,101,694.92, mem=0, net=128,135,593.22] | estRows=1,098,305,084.75 | children=[@2] | PhysicalDistribute[178]@2 ( stats=null, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) )
  Chosen Expression ID: 154
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=1.0983050847457628E9
    tupleSize=7.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    cast(element_at(message, 'totalCostMs') as BIGINT)#14 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,007.6
    Properties: ANY
    Expression ID: 154#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,000,000,007.6
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 154#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,558,305,092.35
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    Expression ID: 177#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #4 ──────────────────────────────
    Cost: 54,558,305,092.35
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    Expression ID: 177#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@3]
  Logical Expressions:
    [1] id:102#3 | cost=null | estRows=366,101,694.92 | children=[@2] | LogicalAggregate[103] ( groupByExpr=[event_date#0, domain#10, anomaly_type#11], outputExpr=[event_date#0, domain#10, anomaly_type#11, count(*) AS `visits`#12, avg(cast(element_at(message, 'totalCostMs') as BIGINT)#14) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#15], hasRepeat=false )
  Physical Expressions:
    [1] id:143#3 | cost=732,203,389.83 [cpu=366,101,694.92, mem=366,101,694.92, net=0] | estRows=-1 | children=[@2] | PhysicalHashAggregate[144]@3 ( stats=null, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[event_date#0, domain#10, anomaly_type#11], outputExpr=[event_date#0, domain#10, anomaly_type#11, count(*) AS `visits`#12, avg(cast(element_at(message, 'totalCostMs') as BIGINT)#14) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#15], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [2] id:149#3 | cost=244,067,796.65 [cpu=122,033,898.35, mem=122,033,898.31, net=0] | estRows=122,033,898.31 | children=[@8] | PhysicalHashAggregate[150]@3 ( stats=null, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[event_date#0, domain#10, anomaly_type#11], outputExpr=[event_date#0, domain#10, anomaly_type#11, count(partial_count(*)#16) AS `visits`#12, avg(partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))#17) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#15], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    (none)
  Chosen Expression ID: 149
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
  Statistics
    rows=3.6610169491525424E8
    tupleSize=22.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    visits#12 -> unknown(1.0)
    avg(cast(element_at(message, 'totalCostMs') as BIGINT))#15 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 55,299,661,024.59
    Properties: ANY
    Expression ID: 149#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 55,299,661,024.59
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    Expression ID: 149#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@4]
  Logical Expressions:
    [1] id:105#4 | cost=null | estRows=366,101,694.92 | children=[@3] | LogicalProject[106] ( distinct=false, projects=[event_date#0, domain#10, anomaly_type#11, visits#12, cast(avg(cast(element_at(message, 'totalCostMs') as BIGINT))#15 as DECIMALV3(20, 4)) AS `avg_cost`#13] )
  Physical Expressions:
    [1] id:134#4 | cost=1.1 [cpu=1.1, mem=0, net=0] | estRows=-1 | children=[@3] | PhysicalProject[135]@4 ( stats=null, projects=[event_date#0, domain#10, anomaly_type#11, visits#12, cast(avg(cast(element_at(message, 'totalCostMs') as BIGINT))#15 as DECIMALV3(20, 4)) AS `avg_cost`#13] )
  Enforcers:
    [1] id:191#4 | cost=201,355,932.2 [cpu=0, mem=0, net=134,237,288.14] | estRows=366,101,694.92 | children=[@4] | PhysicalDistribute[192]@4 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Expression ID: 134
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
  Statistics
    rows=3.6610169491525424E8
    tupleSize=22.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    visits#12 -> unknown(1.0)
    avg_cost#13 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 55,299,661,025.69
    Properties: ANY
    Expression ID: 134#4
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 55,299,661,025.69
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    Expression ID: 134#4
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 55,501,016,957.9
    Properties: GATHER
    Expression ID: 191#4
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@5]
  Logical Expressions:
    [1] id:108#5 | cost=null | estRows=366,101,694.92 | children=[@4] | LogicalSort[109] ( orderKeys=[event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first] )
  Physical Expressions:
    [1] id:126#5 | cost=1,281,355,932.2 [cpu=366,101,694.92, mem=366,101,694.92, net=366,101,694.92] | estRows=366,101,694.92 | children=[@7] | PhysicalQuickSort[127]@5 ( stats=null, orderKeys=[event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first], phase=MERGE_SORT )
    [2] id:129#5 | cost=37,525,423,728.81 [cpu=366,101,694.92, mem=36,610,169,491.53, net=366,101,694.92] | estRows=-1 | children=[@4] | PhysicalQuickSort[130]@5 ( stats=null, orderKeys=[event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first], phase=GATHER_SORT )
  Enforcers:
    (none)
  Chosen Expression ID: 126
  Chosen Properties: DistributionSpecGather Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
  Statistics
    rows=3.6610169491525424E8
    tupleSize=22.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    visits#12 -> unknown(1.0)
    avg_cost#13 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 58,063,728,822.3
    Properties: ANY
    Expression ID: 126#5
    ChildrenRequires:
      [0] GATHER
    ── Entry #2 ────────────────────────────── BEST
    Cost: 58,063,728,822.3
    Properties: DistributionSpecGather Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
    Expression ID: 126#5
    ChildrenRequires:
      [0] GATHER
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

ROOT Group[@6]
  Logical Expressions:
    [1] id:111#6 | cost=null | estRows=366,101,694.92 | children=[@5] | LogicalResultSink[112] ( outputExprs=[event_date#0, domain#10, anomaly_type#11, visits#12, avg_cost#13] )
  Physical Expressions:
    [1] id:116#6 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@5] | PhysicalResultSink[117] ( outputExprs=[event_date#0, domain#10, anomaly_type#11, visits#12, avg_cost#13] )
  Enforcers:
    (none)
  Chosen Expression ID: 116
  Chosen Properties: GATHER
  Statistics
    rows=3.6610169491525424E8
    tupleSize=22.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    visits#12 -> unknown(1.0)
    avg_cost#13 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 58,063,728,822.3
    Properties: ANY
    Expression ID: 116#6
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 58,063,728,822.3
    Properties: GATHER
    Expression ID: 116#6
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@7]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:123#7 | cost=1,281,355,932.2 [cpu=366,101,694.92, mem=366,101,694.92, net=366,101,694.92] | estRows=366,101,694.92 | children=[@4] | PhysicalQuickSort[124]@7 ( stats=null, orderKeys=[event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first], phase=LOCAL_SORT )
  Enforcers:
    [1] id:209#7 | cost=201,355,932.2 [cpu=0, mem=0, net=134,237,288.14] | estRows=366,101,694.92 | children=[@7] | PhysicalDistribute[210]@7 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Enforcer(ID, RequiredProperties):
      (0)209,  GATHER
  Chosen Expression ID: 123
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
  Statistics
    rows=3.6610169491525424E8
    tupleSize=22.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    visits#12 -> unknown(1.0)
    avg_cost#13 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 56,581,016,957.9
    Properties: ANY
    Expression ID: 123#7
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 56,581,016,957.9
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
    Expression ID: 123#7
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    ── Entry #3 ────────────────────────────── BEST
    Cost: 56,782,372,890.1
    Properties: GATHER
    Expression ID: 209#7
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@8]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:146#8 | cost=732,203,389.83 [cpu=366,101,694.92, mem=366,101,694.92, net=0] | estRows=366,101,694.92 | children=[@2] | PhysicalHashAggregate[147]@8 ( stats=null, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[event_date#0, domain#10, anomaly_type#11], outputExpr=[event_date#0, domain#10, anomaly_type#11, partial_count(*) AS `partial_count(*)`#16, partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT)#14) AS `partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#17], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    [1] id:174#8 | cost=323,389,830.51 [cpu=122,033,898.31, mem=0, net=134,237,288.14] | estRows=366,101,694.92 | children=[@8] | PhysicalDistribute[175]@8 ( stats=null, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) )
  Chosen Enforcer(ID, RequiredProperties):
      (0)174,  DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
  Chosen Expression ID: 146
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=3.6610169491525424E8
    tupleSize=22.0
    width=1
    event_date#0 -> ndv=6.1017, min=20260612000000.000000(2026-06-12), max=20260618000000.000000(2026-06-18), count=10800000000.0000, numNulls=0.0000, avgSizeByte=4.000000, hotValues=(null)
    domain#10 -> unknown(1.0)
    anomaly_type#11 -> unknown(1.0)
    partial_count(*)#16 -> unknown(1.0)
    partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))#17 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,732,203,397.43
    Properties: ANY
    Expression ID: 146#8
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,732,203,397.43
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 146#8
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ────────────────────────────── BEST
    Cost: 55,055,593,227.94
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    Expression ID: 174#8
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #4 ──────────────────────────────
    Cost: 55,055,593,227.94
    Properties: DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) Order: ([])
    Expression ID: 174#8
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}

========== OPTIMIZED PLAN ==========
PhysicalResultSink[283] ( outputExprs=[event_date#0, domain#10, anomaly_type#11, visits#12, avg_cost#13] )
+--PhysicalQuickSort[279]@5 ( stats=366,101,694.92, orderKeys=[event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first], phase=MERGE_SORT )
   +--PhysicalDistribute[275]@7 ( stats=366,101,694.92, distributionSpec=DistributionSpecGather )
      +--PhysicalQuickSort[271]@7 ( stats=366,101,694.92, orderKeys=[event_date#0 asc null first, domain#10 asc null first, anomaly_type#11 asc null first], phase=LOCAL_SORT )
         +--PhysicalProject[267]@4 ( stats=366,101,694.92, projects=[event_date#0, domain#10, anomaly_type#11, visits#12, cast(avg(cast(element_at(message, 'totalCostMs') as BIGINT))#15 as DECIMALV3(20, 4)) AS `avg_cost`#13] )
            +--PhysicalHashAggregate[263]@3 ( stats=366,101,694.92, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[event_date#0, domain#10, anomaly_type#11], outputExpr=[event_date#0, domain#10, anomaly_type#11, count(partial_count(*)#16) AS `visits`#12, avg(partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))#17) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#15], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
               +--PhysicalDistribute[259]@8 ( stats=366,101,694.92, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[0, 10, 11], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[0], [10], [11]], exprIdToEquivalenceSet={0=0, 10=1, 11=2} ) )
                  +--PhysicalHashAggregate[255]@8 ( stats=366,101,694.92, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[event_date#0, domain#10, anomaly_type#11], outputExpr=[event_date#0, domain#10, anomaly_type#11, partial_count(*) AS `partial_count(*)`#16, partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT)#14) AS `partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#17], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
                     +--PhysicalProject[251]@2 ( stats=1,098,305,084.75, projects=[event_date#0, cast(element_at(message#7, 'mainDomain') as TEXT) AS `domain`#10, cast(element_at(message#7, 'anomalyType') as TEXT) AS `anomaly_type`#11, cast(element_at(message#7, 'totalCostMs') as BIGINT) AS `cast(element_at(message, 'totalCostMs') as BIGINT)`#14] )
                        +--PhysicalFilter[247]@1 ( stats=1,098,305,084.75, predicates=AND[(event_date#0 >= 2026-06-12),(event_date#0 <= 2026-06-18)] )
                           +--PhysicalFileScan[243]@0 ( table=browser_access_pk_variant_unshredded, stats=10,800,000,000, 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#0, message#7] )

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

MaterializedView
MaterializedViewRewriteSuccessAndChose:

MaterializedViewRewriteSuccessButNotChose:

MaterializedViewRewriteFail:
 CBO.internal.variant_perf_doris.mv_truewatch_spark_unshredded fail
  FailInfo: View struct info is invalid:view plan is LogicalResultSink[111] ( outputExprs=[event_date#0, event_hour#10, main_domain#11, anomaly_type#12, visit_count#13, anomaly_count#14] )
+--LogicalProject[110] ( distinct=false, projects=[event_date#0, event_hour#10, main_domain#11, anomaly_type#12, visit_count#13, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#16 AS `anomaly_count`#14] )
   +--LogicalAggregate[109] ( groupByExpr=[event_date#0, event_hour#10, main_domain#11, anomaly_type#12], outputExpr=[event_date#0, event_hour#10, main_domain#11, anomaly_type#12, count(*) AS `visit_count`#13, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#15) AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#16], hasRepeat=false )
      +--LogicalProject[108] ( distinct=false, projects=[event_date#0, date_trunc(event_time#1, 'hour') AS `event_hour`#10, cast(element_at(message#7, 'mainDomain') as TEXT) AS `main_domain`#11, cast(element_at(message#7, 'anomalyType') as TEXT) AS `anomaly_type`#12, if(( not (cast(element_at(message#7, 'anomalyType') as TEXT) = 'normal')), 1, 0) AS `CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END`#15] )
         +--LogicalFilter[107] ( predicates=(event_date#0 = 2026-06-15) )
            +--LogicalFileScan ( qualified=truewatch_iceberg_rest_4809.variant_truewatch_60d_pk_20260805_probe_perf5d_b128_range_sp4096.browser_access_pk_variant_unshredded, output=[event_date#0, event_time#1, event_time_ms#2, event_id#3, source#4, dw_keyword#5, load_version#6, message#7, _row_id#8, _last_updated_sequence_number#9], operativeCols=[event_date#0, event_time#1, message#7] ), Predicate compensate fail:query predicates = Predicates ( pulledUpPredicates=[(event_date#0 >= 2026-06-12), (event_date#0 <= 2026-06-18)], predicatesUnderBreaker=[] ),
 query equivalenceClass = EquivalenceClass{equivalenceSlotMap={}}, 
view predicates = Predicates ( pulledUpPredicates=[(event_date#0 = 2026-06-15)], predicatesUnderBreaker=[] ),
 query equivalenceClass = EquivalenceClass{equivalenceSlotMap={}}
comparisonResult = valid: true 
 viewExpressions: [] 
 queryExpressions :[] 
 viewNoNullableSlot :[] 
queryAllPulledUpExpressions :[] 
 
