Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: integrate hashEqual interface into LogicalPlan and expression.Expression. #55652

Merged
merged 20 commits into from
Aug 27, 2024
Prev Previous commit
Next Next commit
.
Signed-off-by: arenatlx <314806019@qq.com>
  • Loading branch information
AilinKid committed Aug 26, 2024
commit efcaa59123f5c2073e6a1c309f61f15b735645ea
3 changes: 3 additions & 0 deletions pkg/planner/core/operator/logicalop/base_logical_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/pingcap/tidb/pkg/planner/util/utilfuncp"
"github.com/pingcap/tidb/pkg/types"
"github.com/pingcap/tidb/pkg/util/dbterror/plannererrors"
"github.com/pingcap/tidb/pkg/util/intest"
"github.com/pingcap/tidb/pkg/util/tracing"
)

Expand Down Expand Up @@ -55,11 +56,13 @@ type BaseLogicalPlan struct {

// Hash64 implements HashEquals.<0th> interface.
func (p *BaseLogicalPlan) Hash64(h mutil.Hasher) {
intest.Assert(false, "Hash64 should not be called directly")
h.HashInt(p.ID())
}

// Equals implements HashEquals.<1st> interface.
func (p *BaseLogicalPlan) Equals(other any) bool {
intest.Assert(false, "Equals should not be called directly")
if other == nil {
return false
}
Expand Down