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

executor: set time zone offset in tipb.SelectRequest. #1816

Merged
merged 3 commits into from
Oct 11, 2016

Conversation

coocood
Copy link
Member

@coocood coocood commented Oct 11, 2016

The time zone offset will be used by TiKV to compare timestamp type.

The time zone offset will be used by TiKV to compare timestamp type.
@coocood
Copy link
Member Author

coocood commented Oct 11, 2016

@shenli @tiancaiamao @zimulala @BusyJay PTAL

@@ -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.
Copy link
Contributor

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())
Copy link
Member

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?

Copy link
Member Author

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.

@shenli
Copy link
Member

shenli commented Oct 11, 2016

LGTM
/cc @BusyJay

@BusyJay
Copy link
Contributor

BusyJay commented Oct 11, 2016

LGTM

@coocood coocood merged commit 8935bf9 into master Oct 11, 2016
@coocood coocood deleted the coocood/pass-time-zone-offset branch October 11, 2016 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants