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

Group[@1]
  Logical Expressions:
    [1] id:194#1 | cost=null | estRows=180,000,000 | children=[@0] | LogicalFilter[195] ( predicates=(event_date#0 = 2026-06-15) )
  Physical Expressions:
    [1] id:265#1 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@0] | PhysicalFilter[266]@1 ( stats=null, predicates=(event_date#0 = 2026-06-15) )
  Enforcers:
    (none)
  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: 265#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 54,000,000,000
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 265#1
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@2]
  Logical Expressions:
    [1] id:197#2 | cost=null | estRows=180,000,000 | children=[@1] | LogicalProject[198] ( distinct=false, projects=[cast(element_at(message#7, 'mainDomain') as TEXT) AS `domain`#10, 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`#13] )
  Physical Expressions:
    [1] id:260#2 | cost=9.8 [cpu=9.8, mem=0, net=0] | estRows=-1 | children=[@1] | PhysicalProject[261]@2 ( stats=null, projects=[cast(element_at(message#7, 'mainDomain') as TEXT) AS `domain`#10, 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`#13] )
  Enforcers:
    [1] id:283#2 | cost=62,700,000 [cpu=60,000,000, mem=0, net=1,800,000] | estRows=180,000,000 | children=[@2] | PhysicalDistribute[284]@2 ( stats=null, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) )
  Statistics
    rows=1.8E8
    tupleSize=2.0
    width=1
    domain#10 -> unknown(1.0)
    CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#13 -> ndv=2.0000, min=-Infinity(null), max=Infinity(null), count=0.0000, numNulls=0.0000, avgSizeByte=1.000000, hotValues=(null)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,000,000,009.8
    Properties: ANY
    Expression ID: 260#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 54,000,000,009.8
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 260#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,062,700,009.8
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 283#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #4 ──────────────────────────────
    Cost: 54,062,700,009.8
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 283#2
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@3]
  Logical Expressions:
    [1] id:200#3 | cost=null | estRows=60,000,000 | children=[@2] | LogicalAggregate[201] ( groupByExpr=[domain#10], outputExpr=[domain#10, count(*) AS `visits`#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#13) AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#14], hasRepeat=false )
    [2] id:319#3 | cost=null | estRows=160 | children=[@12] | LogicalProject[320] ( distinct=false, projects=[main_domain#19 AS `domain`#10, sum(visit_count)#23 AS `visits`#11, sum(anomaly_count)#24 AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#14] )
  Physical Expressions:
    [1] id:249#3 | cost=120,000,000 [cpu=60,000,000, mem=60,000,000, net=0] | estRows=-1 | children=[@2] | PhysicalHashAggregate[250]@3 ( stats=null, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[domain#10], outputExpr=[domain#10, count(*) AS `visits`#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#13) AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#14], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [2] id:255#3 | cost=40,000,000.04 [cpu=20,000,000.04, mem=20,000,000, net=0] | estRows=20,000,000 | children=[@9] | PhysicalHashAggregate[256]@3 ( stats=null, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[domain#10], outputExpr=[domain#10, count(partial_count(*)#15) AS `visits`#11, sum(partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#16) AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#14], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [3] id:324#3 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@12] | PhysicalProject[325]@3 ( stats=null, projects=[main_domain#19 AS `domain`#10, sum(visit_count)#23 AS `visits`#11, sum(anomaly_count)#24 AS `sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#14] )
  Enforcers:
    (none)
  Chosen Expression ID: 324
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
  Statistics
    rows=6.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    visits#11 -> unknown(1.0)
    sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#14 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 801
    Properties: ANY
    Expression ID: 324#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 324#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,180,900,009.84
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 255#3
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@4]
  Logical Expressions:
    [1] id:203#4 | cost=null | estRows=30,000,000 | children=[@3] | LogicalFilter[204] ( predicates=(sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#14 > 0) )
  Physical Expressions:
    [1] id:240#4 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@3] | PhysicalFilter[241]@4 ( stats=null, predicates=(sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#14 > 0) )
  Enforcers:
    (none)
  Chosen Expression ID: 240
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
  Statistics
    rows=3.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    visits#11 -> unknown(1.0)
    sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#14 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 801
    Properties: ANY
    Expression ID: 240#4
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 240#4
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[{0}], infoMapByTableId=[{0}], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

Group[@5]
  Logical Expressions:
    [1] id:206#5 | cost=null | estRows=30,000,000 | children=[@4] | LogicalProject[207] ( distinct=false, projects=[domain#10, visits#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#14 AS `anomalies`#12] )
  Physical Expressions:
    [1] id:235#5 | cost=1 [cpu=1, mem=0, net=0] | estRows=-1 | children=[@4] | PhysicalProject[236]@5 ( stats=null, projects=[domain#10, visits#11, sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#14 AS `anomalies`#12] )
  Enforcers:
    [1] id:379#5 | cost=450,000 [cpu=0, mem=0, net=300,000] | estRows=30,000,000 | children=[@5] | PhysicalDistribute[380]@5 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Expression ID: 235
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
  Statistics
    rows=3.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    visits#11 -> unknown(1.0)
    anomalies#12 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 802
    Properties: ANY
    Expression ID: 235#5
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 802
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 235#5
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 450,802
    Properties: GATHER
    Expression ID: 379#5
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@6]
  Logical Expressions:
    [1] id:209#6 | cost=null | estRows=30,000,000 | children=[@5] | LogicalSort[210] ( orderKeys=[domain#10 asc null first] )
  Physical Expressions:
    [1] id:227#6 | cost=105,000,000 [cpu=30,000,000, mem=30,000,000, net=30,000,000] | estRows=30,000,000 | children=[@8] | PhysicalQuickSort[228]@6 ( stats=null, orderKeys=[domain#10 asc null first], phase=MERGE_SORT )
    [2] id:230#6 | cost=3,075,000,000 [cpu=30,000,000, mem=3,000,000,000, net=30,000,000] | estRows=-1 | children=[@5] | PhysicalQuickSort[231]@6 ( stats=null, orderKeys=[domain#10 asc null first], phase=GATHER_SORT )
  Enforcers:
    (none)
  Chosen Expression ID: 227
  Chosen Properties: DistributionSpecGather Order: ([domain#10 asc null first])
  Statistics
    rows=3.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    visits#11 -> unknown(1.0)
    anomalies#12 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 210,450,802
    Properties: ANY
    Expression ID: 227#6
    ChildrenRequires:
      [0] GATHER
    ── Entry #2 ────────────────────────────── BEST
    Cost: 210,450,802
    Properties: DistributionSpecGather Order: ([domain#10 asc null first])
    Expression ID: 227#6
    ChildrenRequires:
      [0] GATHER
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

ROOT Group[@7]
  Logical Expressions:
    [1] id:212#7 | cost=null | estRows=30,000,000 | children=[@6] | LogicalResultSink[213] ( outputExprs=[domain#10, visits#11, anomalies#12] )
  Physical Expressions:
    [1] id:217#7 | cost=0 [cpu=0, mem=0, net=0] | estRows=-1 | children=[@6] | PhysicalResultSink[218] ( outputExprs=[domain#10, visits#11, anomalies#12] )
  Enforcers:
    (none)
  Chosen Expression ID: 217
  Chosen Properties: GATHER
  Statistics
    rows=3.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    visits#11 -> unknown(1.0)
    anomalies#12 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 210,450,802
    Properties: ANY
    Expression ID: 217#7
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([domain#10 asc null first])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 210,450,802
    Properties: GATHER
    Expression ID: 217#7
    ChildrenRequires:
      [0] DistributionSpecGather Order: ([domain#10 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@8]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:224#8 | cost=105,000,000 [cpu=30,000,000, mem=30,000,000, net=30,000,000] | estRows=30,000,000 | children=[@5] | PhysicalQuickSort[225]@8 ( stats=null, orderKeys=[domain#10 asc null first], phase=LOCAL_SORT )
  Enforcers:
    [1] id:385#8 | cost=450,000 [cpu=0, mem=0, net=300,000] | estRows=30,000,000 | children=[@8] | PhysicalDistribute[386]@8 ( stats=null, distributionSpec=DistributionSpecGather )
  Chosen Enforcer(ID, RequiredProperties):
      (0)385,  GATHER
  Chosen Expression ID: 224
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([domain#10 asc null first])
  Statistics
    rows=3.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    visits#11 -> unknown(1.0)
    anomalies#12 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 105,000,802
    Properties: ANY
    Expression ID: 224#8
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 105,000,802
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([domain#10 asc null first])
    Expression ID: 224#8
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    ── Entry #3 ────────────────────────────── BEST
    Cost: 105,450,802
    Properties: GATHER
    Expression ID: 385#8
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([domain#10 asc null first])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@9]
  Logical Expressions:
    (none)
  Physical Expressions:
    [1] id:252#9 | cost=120,000,000 [cpu=60,000,000, mem=60,000,000, net=0] | estRows=60,000,000 | children=[@2] | PhysicalHashAggregate[253]@9 ( stats=null, aggPhase=LOCAL, aggMode=INPUT_TO_BUFFER, maybeUseStreaming=true, groupByExpr=[domain#10], outputExpr=[domain#10, partial_count(*) AS `partial_count(*)`#15, partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END#13) AS `partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)`#16], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    [1] id:280#9 | cost=20,900,000 [cpu=20,000,000, mem=0, net=600,000] | estRows=60,000,000 | children=[@9] | PhysicalDistribute[281]@9 ( stats=null, distributionSpec=DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) )
  Statistics
    rows=6.0E7
    tupleSize=17.0
    width=1
    domain#10 -> unknown(1.0)
    partial_count(*)#15 -> unknown(1.0)
    partial_sum(CASE WHEN ( not (cast(element_at(message, 'anomalyType') as TEXT) = 'normal')) THEN 1 ELSE 0 END)#16 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 54,120,000,009.8
    Properties: ANY
    Expression ID: 252#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #2 ──────────────────────────────
    Cost: 54,120,000,009.8
    Properties: DistributionSpecStorageAny Order: ([])
    Expression ID: 252#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #3 ──────────────────────────────
    Cost: 54,140,900,009.8
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=EXECUTION_BUCKETED, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 280#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
    ── Entry #4 ──────────────────────────────
    Cost: 54,140,900,009.8
    Properties: DistributionSpecHash ( orderedShuffledColumns=[10], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[10]], exprIdToEquivalenceSet={10=0} ) Order: ([])
    Expression ID: 280#9
    ChildrenRequires:
      [0] DistributionSpecStorageAny Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={}}
═══════════════════════════════════════════════════════════

Group[@10]
  Logical Expressions:
    [1] id:310#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=[event_date#17, main_domain#19, anomaly_type#20, anomaly_count#22], virtualColumns=[] )
  Physical Expressions:
    [1] id:348#10 | cost=480 [cpu=480, mem=0, net=0] | estRows=-1 | children=[] | PhysicalOlapScan[349]@10 ( table=mv_truewatch_spark_unshredded, stats=null, operativeSlots=[event_date#17, main_domain#19, anomaly_type#20, anomaly_count#22], virtualColumns=[] )
  Enforcers:
    (none)
  Chosen Expression ID: 348
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
  Statistics
    rows=480.0
    tupleSize=6.0
    width=1
    event_date#17 -> unknown(480.0)
    event_hour#18 -> unknown(480.0)
    main_domain#19 -> unknown(480.0)
    anomaly_type#20 -> unknown(480.0)
    visit_count#21 -> unknown(480.0)
    anomaly_count#22 -> unknown(480.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 480
    Properties: ANY
    Expression ID: 348#10
    ── Entry #2 ────────────────────────────── BEST
    Cost: 480
    Properties: DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
    Expression ID: 348#10
    ── Entry #3 ──────────────────────────────
    Cost: 480
    Properties: DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=REQUIRE, tableId=-1, selectedIndexId=-1, partitionIds=[], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
    Expression ID: 348#10
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

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

Group[@12]
  Logical Expressions:
    [1] id:316#12 | cost=null | estRows=160 | children=[@11] | LogicalAggregate[317] ( groupByExpr=[main_domain#19], outputExpr=[main_domain#19, sum(visit_count#21) AS `sum(visit_count)`#23, sum(anomaly_count#22) AS `sum(anomaly_count)`#24], hasRepeat=false )
  Physical Expressions:
    [1] id:333#12 | cost=320 [cpu=160, mem=160, net=0] | estRows=-1 | children=[@11] | PhysicalHashAggregate[334]@12 ( stats=null, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[main_domain#19], outputExpr=[main_domain#19, sum(visit_count#21) AS `sum(visit_count)`#23, sum(anomaly_count#22) AS `sum(anomaly_count)`#24], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
    [2] id:339#12 | cost=106.71 [cpu=53.37, mem=53.33, net=0] | estRows=53.33 | children=[@13] | PhysicalHashAggregate[340]@12 ( stats=null, aggPhase=GLOBAL, aggMode=BUFFER_TO_RESULT, maybeUseStreaming=false, groupByExpr=[main_domain#19], outputExpr=[main_domain#19, sum(partial_sum(visit_count)#25) AS `sum(visit_count)`#23, sum(partial_sum(anomaly_count)#26) AS `sum(anomaly_count)`#24], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
  Enforcers:
    (none)
  Chosen Expression ID: 333
  Chosen Properties: DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
  Statistics
    rows=6.0E7
    tupleSize=17.0
    width=1
    main_domain#19 -> unknown(480.0)
    sum(visit_count)#23 -> unknown(1.0)
    sum(anomaly_count)#24 -> unknown(1.0)
  Lowest Plan
    ── Entry #1 ──────────────────────────────
    Cost: 801
    Properties: ANY
    Expression ID: 333#12
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
    ── Entry #2 ────────────────────────────── BEST
    Cost: 801
    Properties: DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
    Expression ID: 333#12
    ChildrenRequires:
      [0] DistributionSpecHash ( orderedShuffledColumns=[19], shuffleType=NATURAL, tableId=1787172442938, selectedIndexId=1787172442939, partitionIds=[1787172442957], equivalenceExprIds=[[19]], exprIdToEquivalenceSet={19=0} ) Order: ([])
  struct info map
StructInfoMap{ groupExpressionMapByRelationId=[], infoMapByRelationId=[], groupExpressionMapByTableId=[], infoMapByTableId=[], refreshVersion={{0}=84696351}}
═══════════════════════════════════════════════════════════

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

========== OPTIMIZED PLAN ==========
PhysicalResultSink[484] ( outputExprs=[domain#10, visits#11, anomalies#12] )
+--PhysicalQuickSort[481]@6 ( stats=30,000,000, orderKeys=[domain#10 asc null first], phase=MERGE_SORT )
   +--PhysicalDistribute[478]@8 ( stats=30,000,000, distributionSpec=DistributionSpecGather )
      +--PhysicalQuickSort[475]@8 ( stats=30,000,000, orderKeys=[domain#10 asc null first], phase=LOCAL_SORT )
         +--PhysicalProject[472]@5 ( stats=30,000,000, projects=[main_domain#19 AS `domain`#10, sum(visit_count)#23 AS `visits`#11, sum(anomaly_count)#24 AS `anomalies`#12] )
            +--PhysicalFilter[446]@4 ( stats=30,000,000, predicates=(sum(anomaly_count)#24 > 0) )
               +--PhysicalHashAggregate[442]@12 ( stats=60,000,000, aggPhase=GLOBAL, aggMode=INPUT_TO_RESULT, maybeUseStreaming=false, groupByExpr=[main_domain#19], outputExpr=[main_domain#19, sum(visit_count#21) AS `sum(visit_count)`#23, sum(anomaly_count#22) AS `sum(anomaly_count)`#24], partitionExpr=Optional.empty, topnFilter=false, topnPushDown=false )
                  +--PhysicalProject[438]@11 ( stats=480, projects=[main_domain#19, visit_count#21, anomaly_count#22] )
                     +--PhysicalOlapScan[434]@10 ( table=mv_truewatch_spark_unshredded, stats=480, operativeSlots=[event_date#17, main_domain#19, anomaly_type#20, anomaly_count#22], virtualColumns=[] )

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

MaterializedView
MaterializedViewRewriteSuccessAndChose:
 CBO.internal.variant_perf_doris.mv_truewatch_spark_unshredded chose

MaterializedViewRewriteSuccessButNotChose:

MaterializedViewRewriteFail:
