-
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
stmtctx: move time zone info in stmtctx.StatementContext into TypeCtx #47592
Conversation
bda83f7
to
464d5a9
Compare
b542d27
to
2b1d197
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47592 +/- ##
================================================
+ Coverage 71.8876% 72.7088% +0.8211%
================================================
Files 1353 1376 +23
Lines 401066 408249 +7183
================================================
+ Hits 288317 296833 +8516
+ Misses 93329 92526 -803
+ Partials 19420 18890 -530
Flags with carried forward coverage won't be shown. Click here to find out more.
|
8919ffa
to
8195008
Compare
8195008
to
15745e6
Compare
/retest |
1 similar comment
/retest |
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.
LGTM
@@ -420,6 +425,55 @@ type StatementContext struct { | |||
} | |||
} | |||
|
|||
// NewStmtCtx creates a new statement context | |||
func NewStmtCtx() *StatementContext { |
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.
I've tried to write a linter to make sure the &StatementContext{}
is only constructed manually in NewStmtCtx
or NewStmtCtxWithTimeZone
. I'll submit that linter after this PR is merged 🍻
@lcwangchao: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
No Comment
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.
LGTM
/test tiprow_fast_test |
@lcwangchao: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/approve |
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3pointer, bb7133, easonn7, lance6716, windtalker, YangKeao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #47590
What is changed and how it works?
StatementContext.TypeCtx.Location
as the timezone inStatementContext
and remove the dup fieldStatementContext.TimeZone
StatementContext.TimeZone()
to return the inner location info.NewStmtCtx
,NewStmtCtxWithTimeZone
, andReset
to create or resetStatementContext
to make sure the innerTypeCtx
will be properly inited.&stmtctx.StatementContext{...}
ornew(stmtctx.StatementContext)
with these constructors.SetTimeZone
,SetTypeFlags
andUpdateTypeFlags
to provide easy way to updateTypeCtx
NoCopy
struct to mark an object as no copy.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.