Skip to content

Commit

Permalink
fix global approx percentile stream key
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Jul 22, 2024
1 parent 85b8e3e commit 2aa5111
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/frontend/planner_test/tests/testdata/output/agg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@
└─LogicalProject { exprs: [t.v1::Float64 as $expr1] }
└─LogicalScan { table: t, columns: [t.v1, t._row_id] }
stream_plan: |-
StreamMaterialize { columns: [approx_percentile], stream_key: [approx_percentile], pk_columns: [approx_percentile], pk_conflict: NoCheck }
StreamMaterialize { columns: [approx_percentile], stream_key: [], pk_columns: [], pk_conflict: NoCheck }
└─StreamGlobalApproxPercentile
└─StreamLocalApproxPercentile { percentile_col: $expr1, quantile: 0.5:Decimal, relative_error: 0.01:Decimal }
└─StreamProject { exprs: [t.v1::Float64 as $expr1, t._row_id] }
Expand All @@ -1904,7 +1904,7 @@
└─LogicalProject { exprs: [t.v1::Float64 as $expr1, t.v1] }
└─LogicalScan { table: t, columns: [t.v1, t._row_id] }
stream_plan: |-
StreamMaterialize { columns: [approx_percentile, sum], stream_key: [approx_percentile], pk_columns: [approx_percentile], pk_conflict: NoCheck }
StreamMaterialize { columns: [approx_percentile, sum], stream_key: [], pk_columns: [], pk_conflict: NoCheck }
└─StreamKeyedMerge { output: [approx_percentile:Float64, sum(sum(t.v1)):Int64] }
├─StreamGlobalApproxPercentile
│ └─StreamLocalApproxPercentile { percentile_col: $expr1, quantile: 0.5:Decimal, relative_error: 0.01:Decimal }
Expand All @@ -1927,7 +1927,7 @@
└─LogicalProject { exprs: [t.v1, t.v1::Float64 as $expr1] }
└─LogicalScan { table: t, columns: [t.v1, t._row_id] }
stream_plan: |-
StreamMaterialize { columns: [s1, approx_percentile, s2, count], stream_key: [s2], pk_columns: [s2], pk_conflict: NoCheck }
StreamMaterialize { columns: [s1, approx_percentile, s2, count], stream_key: [], pk_columns: [], pk_conflict: NoCheck }
└─StreamProject { exprs: [sum(sum(t.v1)), approx_percentile, sum(sum(t.v1)), sum0(count(t.v1))] }
└─StreamKeyedMerge { output: [sum(sum(t.v1)):Int64, approx_percentile:Float64, sum0(count(t.v1)):Int64] }
├─StreamGlobalApproxPercentile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl StreamGlobalApproxPercentile {
let base = PlanBase::new_stream(
input.ctx(),
schema,
Some(vec![0]),
Some(vec![]),
input.functional_dependency().clone(),
Distribution::Single,
input.append_only(),
Expand Down

0 comments on commit 2aa5111

Please sign in to comment.