Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
juniaoshaonian committed Jun 16, 2024
1 parent e04906b commit b40bf3e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/merger/internal/aggregatemerger/aggregator/avg.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (a *AVG) avgNullAbleAggregator(cols [][]any, sumIndex int, countIndex int)
}, nil
}

func (a *AVG) getEmptyVal(cols []any, index int) any {
func (*AVG) getEmptyVal(cols []any, index int) any {
var emptyVal any
col := cols[index]
if reflect.TypeOf(col).Kind() == reflect.Struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func countAggregate[T AggregateElement](cols [][]any, countIndex int) (any, erro
}
return count, nil
}
func (s *Count) countNullAbleAggregator(colsData [][]any, countIndex int) (any, error) {
func (*Count) countNullAbleAggregator(colsData [][]any, countIndex int) (any, error) {
notNullCols, kind := nullAbleAggregator(colsData, countIndex)
// 说明几个数据库里查出来的数据都为null,返回第一个null值即可
if len(notNullCols) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/merger/internal/aggregatemerger/aggregator/max.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewMax(info merger.ColumnInfo) *Max {
func maxAggregator[T AggregateElement](colsData [][]any, maxIndex int) (any, error) {
return findExtremeValue[T](colsData, isMaxValue[T], maxIndex)
}
func (m *Max) maxNullAbleAggregator(colsData [][]any, maxIndex int) (any, error) {
func (*Max) maxNullAbleAggregator(colsData [][]any, maxIndex int) (any, error) {
notNullCols, kind := nullAbleAggregator(colsData, maxIndex)
// 说明几个数据库里查出来的数据都为null,返回第一个null值即可
if len(notNullCols) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/merger/internal/aggregatemerger/aggregator/min.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func minAggregator[T AggregateElement](colsData [][]any, minIndex int) (any, err
return findExtremeValue[T](colsData, isMinValue[T], minIndex)
}

func (m *Min) minNullAbleAggregator(colsData [][]any, minIndex int) (any, error) {
func (*Min) minNullAbleAggregator(colsData [][]any, minIndex int) (any, error) {
notNullCols, kind := nullAbleAggregator(colsData, minIndex)
// 说明几个数据库里查出来的数据都为null,返回第一个null值即可
if len(notNullCols) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/merger/internal/aggregatemerger/aggregator/sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func sumAggregate[T AggregateElement](cols [][]any, sumIndex int) (any, error) {
return sum, nil
}

func (s *Sum) sumNullAbleAggregator(colsData [][]any, sumIndex int) (any, error) {
func (*Sum) sumNullAbleAggregator(colsData [][]any, sumIndex int) (any, error) {
notNullCols, kind := nullAbleAggregator(colsData, sumIndex)
// 说明几个数据库里查出来的数据都为null,返回第一个null值即可
if len(notNullCols) == 0 {
Expand Down

0 comments on commit b40bf3e

Please sign in to comment.