-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add Timestamp sql parameter. #2355
Conversation
4e8b989
to
c7f2874
Compare
} | ||
|
||
func TestinConnectionSettings(t *testing.T) { | ||
func TestConnectionSettings(t *testing.T) { |
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.
This test was disabled by mistake!
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.
👌
@vivekmenezes You should reference the issue in your commit messages (e.g. |
@petermattis @vivekmenezes I edited the PR descriptor so that #2328 is referenced. |
c7f2874
to
068ca7e
Compare
// ***** This test has been disabled ******** | ||
// TODO(vivek): Fix/Rewrite this flaky test. | ||
// Fix issue https://github.com/cockroachdb/cockroach/issues/2366 | ||
func DisabledTestOverlappingTransactions(t *testing.T) { |
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 wont merge this in before this test is fixed. I just want this PR to be ready so when the test it fixed I can merge it.
068ca7e
to
ac1f670
Compare
@@ -192,3 +195,52 @@ func rollbackTxnAndReturnResultWithError(planMaker *planner, err error) driver.R | |||
errProto.SetResponseGoError(err) | |||
return driver.Result{Error: &errProto} | |||
} | |||
|
|||
// GetParameters returns the Params slice as a `parameters`. | |||
func GetParameters(r driver.Request) Parameters { |
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.
let's remove and inline this function. It kind of made sense as a method but now it's totally useless.
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.
done
ac1f670
to
855d216
Compare
Allow casting of integer to interval type. Get rid of sql/driver -> sql/parser dependency.
855d216
to
f443712
Compare
LGTM |
param.BytesVal = time | ||
// Send absolute time devoid of time-zone. | ||
t := Datum_Timestamp{Sec: value.Unix(), Nsec: uint32(value.Nanosecond())} | ||
param.TimeVal = &t |
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 don't see much purpose in the temporary:
param.TimeVal = &Datum_Timestamp{
Sec: value.Unix(),
Nsec: uint32(value.Nanosecond()),
}
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.
FWIW I have this change made locally in #2375
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.
thanks!
LGTM |
Add Timestamp sql parameter.
Allow casting of integer to interval type.
Get rid of sql/driver -> sql/parser dependency.
Fixes #2328.