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: fix wrong DATE/DATETIME comparison in BETWEEN function (#10313) #10407

Merged
merged 4 commits into from
May 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix ci
  • Loading branch information
erjiaqing committed May 9, 2019
commit 5cfa26285fc8cc9d5f9aa448827e073275ea83ed
4 changes: 2 additions & 2 deletions planner/core/expression_rewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,9 @@ func (er *expressionRewriter) betweenToExpression(v *ast.BetweenExpr) {

var op string
var l, r expression.Expression
l, er.err = er.newFunction(ast.GE, &v.Type, expr, lexp)
l, er.err = expression.NewFunction(ast.GE, &v.Type, expr, lexp)
if er.err == nil {
r, er.err = er.newFunction(ast.LE, &v.Type, expr, rexp)
r, er.err = expression.NewFunction(ast.LE, &v.Type, expr, rexp)
}
op = ast.LogicAnd
if er.err != nil {
Expand Down