Skip to content

Commit

Permalink
planner: add new rules to transfer into dual table
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Jan 7, 2025
1 parent d8375dd commit 74a9df1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/planner/cardinality/row_count_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ func getIndexRowCountForStatsV2(sctx planctx.PlanContext, idx *statistics.Index,
if debugTrace {
debugTraceStartEstimateRange(sctx, indexRange, lb, rb, totalCount)
}
isMysqlTime := indexRange.LowVal[0].Kind() == types.KindMysqlTime && indexRange.HighVal[0].Kind() == types.KindMysqlTime
isMysqlTime := indexRange.LowVal[0].Kind() == types.KindMysqlTime &&
indexRange.HighVal[0].Kind() == types.KindMysqlTime &&
len(indexRange.LowVal) == len(indexRange.HighVal) &&
len(indexRange.LowVal) == 1
fullLen := len(indexRange.LowVal) == len(indexRange.HighVal) && len(indexRange.LowVal) == len(idx.Info.Columns)
if bytes.Equal(lb, rb) {
// case 1: it's a point
Expand Down

0 comments on commit 74a9df1

Please sign in to comment.