-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: set time zone offset in tipb.SelectRequest
.
#1816
Conversation
The time zone offset will be used by TiKV to compare timestamp type.
@@ -806,3 +810,9 @@ func (e *XSelectTableExec) Next() (*Row, error) { | |||
func (e *XSelectTableExec) Fields() []*ast.ResultField { | |||
return nil | |||
} | |||
|
|||
// timeZoneOffset return local time zone offset in seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/return/returns
@@ -511,6 +512,7 @@ func (e *XSelectIndexExec) fetchHandles(idxResult distsql.SelectResult, ch chan< | |||
func (e *XSelectIndexExec) doIndexRequest() (distsql.SelectResult, error) { | |||
selIdxReq := new(tipb.SelectRequest) | |||
selIdxReq.StartTs = e.startTS | |||
selIdxReq.TimeZoneOffset = proto.Int64(timeZoneOffset()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use gogo nullable=false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to do that.
We can fix this the next time we need to update tipb.
LGTM |
LGTM |
The time zone offset will be used by TiKV to compare timestamp type.