Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
george24601 committed May 13, 2024
1 parent e231eb0 commit 40fbb4b
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions _posts/2024/2024-05-13-tidb-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ category:
tags: [tidb, golang]
---

## Join


```go
Expand Down Expand Up @@ -60,10 +62,24 @@ func (b *planBuilder) buildJoin(join *ast.Join) LogicalPlan {
```

## Group by

```go
// LogicalAggregation represents an aggregate plan.
type LogicalAggregation struct {
logicalSchemaProducer
// AggFuncDesc describes an aggregation function signature, only used in planner.
AggFuncs []*aggregation.AggFuncDesc
GroupByItems []expression.Expression
// groupByCols stores the columns that are group-by items.
groupByCols []*expression.Column
possibleProperties [][]*expression.Column
inputCount float64 // inputCount is the input count of this plan.
}
type AggFuncDesc struct {
// Name represents the aggregation function name.
Name string
Expand All @@ -77,18 +93,5 @@ type AggFuncDesc struct {
HasDistinct bool
}
// LogicalAggregation represents an aggregate plan.
type LogicalAggregation struct {
logicalSchemaProducer
AggFuncs []*aggregation.AggFuncDesc
GroupByItems []expression.Expression
// groupByCols stores the columns that are group-by items.
groupByCols []*expression.Column
possibleProperties [][]*expression.Column
inputCount float64 // inputCount is the input count of this plan.
}
```

0 comments on commit 40fbb4b

Please sign in to comment.