MCPcopy Create free account
hub / github.com/pingcap/tidb / HashCode

Method HashCode

pkg/expression/expression.go:252–252  ·  view source on GitHub ↗

HashCode creates the hashcode for expression which can be used to identify itself from other expression. It generated as the following: Constant: ConstantFlag+encoded value Column: ColumnFlag+encoded value ScalarFunction: SFFlag+encoded function name + encoded arg_1 + encoded arg_2 + ...

()

Source from the content-addressed store, hash-verified

250 // Column: ColumnFlag+encoded value
251 // ScalarFunction: SFFlag+encoded function name + encoded arg_1 + encoded arg_2 + ...
252 HashCode() []byte
253
254 // CanonicalHashCode creates the canonical hashcode for expression.
255 // Different with `HashCode`, this method will produce the same hashcode for expressions with the same semantic.

Callers 8

TestConstantFunction · 0.65
ReHashCodeFunction · 0.65
getHashCodeMethod · 0.65
extractFiltersFromDNFFunction · 0.65
RemoveDupExprsFunction · 0.65
TestScalarFunctionFunction · 0.65
TestFilterExtractFromDNFFunction · 0.65

Implementers 4

MockExprpkg/expression/util_test.go
Columnpkg/expression/column.go
ScalarFunctionpkg/expression/scalar_function.go
Constantpkg/expression/constant.go

Calls

no outgoing calls

Tested by 3

TestConstantFunction · 0.52
TestScalarFunctionFunction · 0.52
TestFilterExtractFromDNFFunction · 0.52