
Group[@0]
  Logical Expressions:
    [1] id:80#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:133#0 | cost=54,000,000,000 [cpu=54,000,000,000, mem=0, net=0] | estRows=-1 | children=[] | PhysicalFileScan[134]@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: 133
  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: 133#0
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 133#0
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@1]
  Logical Expressions:
    [1] id:83#1 | cost=null | estRows=180,000,000 | children=[@0] | LogicalFilter[84] ( predicates=(event_date#0 = 2026-06-15) )
  Physical Expressions:
    [1] id:130#1 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@0] | PhysicalFilter[131]@1 ( stats=null, predicates=(event_date#0 = 2026-06-15) )
  Enforcers:
    (none)
  Chosen Expression ID: 130
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=1.8E8
    tupleSize=70.0
    width=1
    event_date#0 -> 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#1 -> 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#2 -> ndv=180000000.0000, min=1780272000000.000000(1780272000000), max=1785455999999.000000(1785455999999), count=10800000000.0000, numNulls=0.0000, avgSizeByte=8.000000, hotValues=(null)
    event_id#3 -> 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#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: 130#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 130#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@2]
  Logical Expressions:
    [1] id:86#2 | cost=null | estRows=180,000,000 | children=[@1] | LogicalProject[87] ( distinct=false, projects=[if((cast(element_at(message#7, 'httpStatusCode') as BIGINT) >= 400), 1, 0) AS `CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END`#14, 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, cast(element_at(message#7, 'totalCostMs') as BIGINT) AS `cast(element_at(message, 'totalCostMs') as BIGINT)`#16] )
  Physical Expressions:
    [1] id:125#2 | cost=12.5 [cpu=12.5, mem=0, net=0] | estRows=-1 | children=[@1] | PhysicalProject[126]@2 ( stats=null, projects=[if((cast(element_at(message#7, 'httpStatusCode') as BIGINT) >= 400), 1, 0) AS `CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END`#14, 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, cast(element_at(message#7, 'totalCostMs') as BIGINT) AS `cast(element_at(message, 'totalCostMs') as BIGINT)`#16] )
  Enforcers:
    [1] id:148#2 | cost=2,700,000 [cpu=0, mem=0, net=1,800,000] | estRows=180,000,000 | children=[@2] | PhysicalDistribute[149]@2 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Expression ID: 125
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=1.8E8
    tupleSize=3.0
    width=1
    CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END#14 -> ndv=2.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=1.000000, hotValues=(null)
    CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#15 -> ndv=2.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=1.000000, hotValues=(null)
    cast(element_at(message, 'totalCostMs') as BIGINT)#16 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,012.5
    Properties: ANY
    Expression ID: 125#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,000,000,012.5
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 125#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,002,700,012.5
    Properties: GATHER
    Expression ID: 148#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@3]
  Logical Expressions:
    [1] id:89#3 | cost=null | estRows=1 | children=[@2] | LogicalAggregate[90] ( groupByExpr=[], outputExpr=[count(*) AS `row_count`#10, sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END#14) AS `sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)`#17, 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)`#18, avg(cast(element_at(message, 'totalCostMs') as BIGINT)#16) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#19], hasRepeat=false )
  Physical Expressions:
    [1] id:114#3 | cost=360,000,000.01 [cpu=180,000,000.01, mem=180,000,000, net=0] | estRows=-1 | children=[@2] | PhysicalHashAggregate[115]@3 ( stats=null, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(*) AS `row_count`#10, sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END#14) AS `sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)`#17, 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)`#18, avg(cast(element_at(message, 'totalCostMs') as BIGINT)#16) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#19], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [2] id:120#3 | cost=2.08 [cpu=1.08, mem=1, net=0] | estRows=1 | children=[@6] | PhysicalHashAggregate[121]@3 ( stats=null, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#20) AS `row_count`#10, sum(partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#21) AS `sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)`#17, sum(partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#22) AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#18, avg(partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))#23) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#19], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    (none)
  Chosen Expression ID: 120
  Chosen Properties: GATHER
  Statistics
    rows=1.0
    tupleSize=32.0
    width=1
    row_count#10 -> unknown(1.0)
    sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#17 -> unknown(1.0)
    sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#18 -> unknown(1.0)
    avg(cast(element_at(message, 'totalCostMs') as BIGINT))#19 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,120,000,014.6
    Properties: ANY
    Expression ID: 120#3
    ChildrenRequires:
      [0] GATHER
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,120,000,014.6
    Properties: GATHER
    Expression ID: 120#3
    ChildrenRequires:
      [0] GATHER
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@4]
  Logical Expressions:
    [1] id:92#4 | cost=null | estRows=1 | children=[@3] | LogicalProject[93] ( distinct=false, projects=[row_count#10, sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#17 AS `error_count`#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#18 AS `anomaly_count`#12, cast(avg(cast(element_at(message, 'totalCostMs') as BIGINT))#19 as DECIMALV3(20, 4)) AS `avg_cost`#13] )
  Physical Expressions:
    [1] id:105#4 | cost=1.1 [cpu=1.1, mem=0, net=0] | estRows=-1 | children=[@3] | PhysicalProject[106]@4 ( stats=null, projects=[row_count#10, sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#17 AS `error_count`#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#18 AS `anomaly_count`#12, cast(avg(cast(element_at(message, 'totalCostMs') as BIGINT))#19 as DECIMALV3(20, 4)) AS `avg_cost`#13] )
  Enforcers:
    (none)
  Chosen Expression ID: 105
  Chosen Properties: GATHER
  Statistics
    rows=1.0
    tupleSize=32.0
    width=1
    row_count#10 -> unknown(1.0)
    error_count#11 -> unknown(1.0)
    anomaly_count#12 -> unknown(1.0)
    avg_cost#13 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,120,000,015.7
    Properties: ANY
    Expression ID: 105#4
    ChildrenRequires:
      [0] GATHER
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,120,000,015.7
    Properties: GATHER
    Expression ID: 105#4
    ChildrenRequires:
      [0] GATHER
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

ROOT Group[@5]
  Logical Expressions:
    [1] id:95#5 | cost=null | estRows=1 | children=[@4] | LogicalResultSink[96] ( outputExprs=[row_count#10, error_count#11, anomaly_count#12, avg_cost#13] )
  Physical Expressions:
    [1] id:100#5 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@4] | PhysicalResultSink[101] ( outputExprs=[row_count#10, error_count#11, anomaly_count#12, avg_cost#13] )
  Enforcers:
    (none)
  Chosen Expression ID: 100
  Chosen Properties: GATHER
  Statistics
    rows=1.0
    tupleSize=32.0
    width=1
    row_count#10 -> unknown(1.0)
    error_count#11 -> unknown(1.0)
    anomaly_count#12 -> unknown(1.0)
    avg_cost#13 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,120,000,015.7
    Properties: ANY
    Expression ID: 100#5
    ChildrenRequires:
      [0] GATHER
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,120,000,015.7
    Properties: GATHER
    Expression ID: 100#5
    ChildrenRequires:
      [0] GATHER
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@6]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:117#6 | cost=120,000,000.01 [cpu=60,000,000.01, mem=60,000,000, net=0] | estRows=1 | children=[@2] | PhysicalHashAggregate[118]@6 ( stats=null, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END#14) AS `partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)`#21, partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT)#16) AS `partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#23, partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#15) AS `partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#22, partial_count(*) AS `partial_count(*)`#20], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    [1] id:145#6 | cost=0.02 [cpu=0, mem=0, net=0.01] | estRows=1 | children=[@6] | PhysicalDistribute[146]@6 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Enforcer(ID, RequiredProperties):
      (0)145,  GATHER
  Chosen Expression ID: 117
  Chosen Properties: DistributionSpecStorageAny Order: ([])
  Statistics
    rows=1.0
    tupleSize=32.0
    width=1
    partial_count(*)#20 -> unknown(1.0)
    partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#21 -> unknown(1.0)
    partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#22 -> unknown(1.0)
    partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))#23 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,120,000,012.51
    Properties: ANY
    Expression ID: 117#6
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 54,120,000,012.51
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 117#6
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ────────────────────────────── BEST
    Cost: 54,120,000,012.52
    Properties: GATHER
    Expression ID: 145#6
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}

========== OPTIMIZED PLAN ==========
PhysicalResultSink[228] ( outputExprs=[row_count#10, error_count#11, anomaly_count#12, avg_cost#13] )
+--PhysicalProject[224]@4 ( stats=1, projects=[row_count#10, sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#17 AS `error_count`#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#18 AS `anomaly_count`#12, cast(avg(cast(element_at(message, 'totalCostMs') as BIGINT))#19 as DECIMALV3(20, 4)) AS `avg_cost`#13] )
   +--PhysicalHashAggregate[220]@3 ( stats=1, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[], outputExpr=[count(partial_count(*)#20) AS `row_count`#10, sum(partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#21) AS `sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)`#17, sum(partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#22) AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#18, avg(partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))#23) AS `avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#19], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
      +--PhysicalDistribute[216]@6 ( stats=1, distributionSpec=DistributionSpecGather )
         +--PhysicalHashAggregate[212]@6 ( stats=1, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=false, groupByExpr=[], outputExpr=[partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END#14) AS `partial_sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)`#21, partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT)#16) AS `partial_avg(cast(element_at(message, 'totalCostMs') as BIGINT))`#23, partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#15) AS `partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#22, partial_count(*) AS `partial_count(*)`#20], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
            +--PhysicalProject[208]@2 ( stats=180,000,000, projects=[if((cast(element_at(message#7, 'httpStatusCode') as BIGINT) >= 400), 1, 0) AS `CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END`#14, 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, cast(element_at(message#7, 'totalCostMs') as BIGINT) AS `cast(element_at(message, 'totalCostMs') as BIGINT)`#16] )
               +--PhysicalFilter[204]@1 ( stats=180,000,000, predicates=(event_date#0 = 2026-06-15) )
                  +--PhysicalFileScan[200]@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] ), Query function roll up fail:queryExpression = sum(CASE WHEN (cast(element_at(message, 'httpStatusCode') as BIGINT) >= 400) THEN 1 ELSE 0 END)#17,
 mvExprToMvScanExprQueryBased = {event_date#0=event_date#24, cast(element_at(message#7, 'mainDomain') as TEXT)=main_domain#26, cast(element_at(message#7, 'anomalyType') as TEXT)=anomaly_type#27, count(*)=visit_count#28, sum(if(( not (cast(element_at(message#7, 'anomalyType') as TEXT) = 'normal')), 1, 0))=anomaly_count#29, date_trunc(event_time#1, 'hour')=event_hour#25}, Query function roll up fail:queryExpression = error_count#11,
 mvExprToMvScanExprQueryBased = {event_date#0=event_date#24, cast(element_at(message#7, 'mainDomain') as TEXT)=main_domain#26, cast(element_at(message#7, 'anomalyType') as TEXT)=anomaly_type#27, count(*)=visit_count#28, sum(if(( not (cast(element_at(message#7, 'anomalyType') as TEXT) = 'normal')), 1, 0))=anomaly_count#29, date_trunc(event_time#1, 'hour')=event_hour#25}
