Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
systay committed Nov 6, 2023
1 parent 5c578d0 commit 96debea
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/vt/vtgate/engine/opcode/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const (
AggregateAnyValue
AggregateCountStar
AggregateGroupConcat
AggregateAvg
_NumOfOpCodes // This line must be last of the opcodes!
)

Expand All @@ -85,6 +86,7 @@ var (
AggregateCountStar: sqltypes.Int64,
AggregateSumDistinct: sqltypes.Decimal,
AggregateSum: sqltypes.Decimal,
AggregateAvg: sqltypes.Decimal,
AggregateGtid: sqltypes.VarChar,
}
)
Expand All @@ -96,6 +98,7 @@ var SupportedAggregates = map[string]AggregateOpcode{
"sum": AggregateSum,
"min": AggregateMin,
"max": AggregateMax,
"avg": AggregateAvg,
// These functions don't exist in mysql, but are used
// to display the plan.
"count_distinct": AggregateCountDistinct,
Expand All @@ -117,6 +120,7 @@ var AggregateName = map[AggregateOpcode]string{
AggregateCountStar: "count_star",
AggregateGroupConcat: "group_concat",
AggregateAnyValue: "any_value",
AggregateAvg: "avg",
}

func (code AggregateOpcode) String() string {
Expand Down Expand Up @@ -145,7 +149,7 @@ func (code AggregateOpcode) Type(typ querypb.Type) querypb.Type {
return sqltypes.Text
case AggregateMax, AggregateMin, AggregateAnyValue:
return typ
case AggregateSumDistinct, AggregateSum:
case AggregateSumDistinct, AggregateSum, AggregateAvg:
if sqltypes.IsIntegral(typ) || sqltypes.IsDecimal(typ) {
return sqltypes.Decimal
}
Expand Down
24 changes: 24 additions & 0 deletions go/vt/vtgate/planbuilder/operators/phases.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package operators
import (
"vitess.io/vitess/go/slice"
"vitess.io/vitess/go/vt/sqlparser"
"vitess.io/vitess/go/vt/vtgate/engine/opcode"
"vitess.io/vitess/go/vt/vtgate/planbuilder/operators/ops"
"vitess.io/vitess/go/vt/vtgate/planbuilder/operators/rewrite"
"vitess.io/vitess/go/vt/vtgate/planbuilder/plancontext"
Expand Down Expand Up @@ -140,12 +141,35 @@ func addOrderingForAllAggregations(ctx *plancontext.PlanningContext, root ops.Op
res = rewrite.NewTree("added ordering before aggregation", in)
}

if needAvgBreaking(aggrOp.Aggregations) {
return splitAvgAggregations()

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Region Sharding example using etcd on ubuntu-22.04

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Local example using etcd on ubuntu-22.04

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Local example using consul on ubuntu-22.04

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / End-to-End Test (Race)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Local example using k8s on ubuntu-22.04

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_suite)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_suite) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_v2)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_migrate_vdiff2_convert_tz)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (schemadiff_vrepl)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_partial_movetables_sequences)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_across_db_versions)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_tablet_healthcheck_cache)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_basic)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vstream_stoponreshard_true)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo_consul)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vstream_stoponreshard_false)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_reservedconn)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_cellalias)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_partial_movetables_basic)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtorc)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_gen4)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / End-to-End Test

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_unsharded)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr_xtrabackup)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_readafterwrite)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_backup)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_revert)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_concurrentdml)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (topo_connection_cache)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_general_heavy)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (12)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (13)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_transaction)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_foreignkey_stress)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (mysql80)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_partial_keyspace)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_vschema)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_multicell)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_scheduler) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (21)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_vrepl_stress) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vstream_with_keyspaces_to_watch)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_vindex_heavy)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_revert) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (schemadiff_vrepl) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_backup) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_godriver)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_consul)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtctlbackup_sharded_clustertest_heavy)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_recovery) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - Manual

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_tablegc)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (mysql_server_vault)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_scheduler)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_tablegc) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_schema)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (tabletmanager_throttler_topo)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Reparent Old Vtctl

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - E2E

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Queries)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_ghost)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_queries)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_schema_tracker)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtorc) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (backup_pitr_xtrabackup) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtgate_topo_etcd)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtbackup)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Query Serving (Schema)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (15)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vttablet_prscomplex)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (onlineddl_ghost) mysql57

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (xb_recovery)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql80)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (ers_prs_newfeatures_heavy)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql57)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 10

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 10

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vstream_failover)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (22)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Reparent Old VTTablet

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (18)

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

splitAvgAggregations() (no value) used as value

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Static Code Checks Etc

splitAvgAggregations() (no value) used as value) (typecheck)

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Static Code Checks Etc

splitAvgAggregations() (no value) used as value (typecheck)

Check failure on line 145 in go/vt/vtgate/planbuilder/operators/phases.go

View workflow job for this annotation

GitHub Actions / Static Code Checks Etc

splitAvgAggregations() (no value) used as value
}

for _, aggr := range aggrOp.Aggregations {
if aggr.OpCode == opcode.AggregateAvg {

}
}

return in, res, nil
}

return rewrite.BottomUp(root, TableID, visitor, stopAtRoute)
}

func needAvgBreaking(aggrs []Aggr) bool {
for _, aggr := range aggrs {
if aggr.OpCode == opcode.AggregateAvg {
return true
}
}
return false
}

func splitAvgAggregations() {

}

func addOrderingFor(aggrOp *Aggregator) {
orderBys := slice.Map(aggrOp.Grouping, func(from GroupBy) ops.OrderBy {
return from.AsOrderBy()
Expand Down

0 comments on commit 96debea

Please sign in to comment.