-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support built-in MySQL functions ABS #9774
Conversation
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 for your first contribution to Vitess! I've left some feedback on things that need to be fixed -- particularly related to testing.
"testing" | ||
) | ||
|
||
func Test_buildinAbs_call(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.
As I explained on my previous review, these are not good unit tests. They look like they've been auto-generated by an IDE, as the test table contains arguments that are always the same, and most puzzlingly, you're not actually verifying the output of the function you're testing!
You should instead focus on writing integration tests in integration/comparison_test.go
. If those tests are comprehensive enough, this particular test will be superfluous.
Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Remove stubbed validation errors Signed-off-by: notfelineit <[email protected]> Restyle page Signed-off-by: notfelineit <[email protected]> Refactor Signed-off-by: notfelineit <[email protected]> Add error state Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Remove helper method Signed-off-by: notfelineit <[email protected]> Cleanup logs Signed-off-by: notfelineit <[email protected]> Undo accidental , unrelated changes to dynamic discovery Signed-off-by: notfelineit <[email protected]> Undo changes to env.sh Signed-off-by: notfelineit <[email protected]> Thread through vtadmin api Signed-off-by: notfelineit <[email protected]> Hook up UI to ValidateSchemaKeyspace Signed-off-by: notfelineit <[email protected]> Add comments to ValidateSchemaKeyspace Signed-off-by: notfelineit <[email protected]> Modify ValidateSchemaKeyspace to match old ValidateSchemaKeyspace in term of params Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> connect to vtadmin Signed-off-by: notfelineit <[email protected]> Fix nil pointer bug Signed-off-by: notfelineit <[email protected]> Fix linter issues Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Add skipNoPrimary test Signed-off-by: notfelineit <[email protected]> Add GetVersion to vtctldServer and add test for ValidateVersionKeyspace Signed-off-by: notfelineit <[email protected]> Switch vtctlclient to use new version of ValidateVersionKeyspace Signed-off-by: notfelineit <[email protected]> Address PR comments Signed-off-by: notfelineit <[email protected]> Replace wrangler methods with vtctldserver replacements Signed-off-by: notfelineit <[email protected]> Fix type issues Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: notfelineit <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Manan Gupta <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Alon Kenneth <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Alon Kenneth <[email protected]> Signed-off-by: akenneth <[email protected]> Signed-off-by: tianshishuo <[email protected]>
…rade build Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: tianshishuo <[email protected]>
In the original implementation, bidiStream used one channel, `errch`, to receive both mid-stream errors and "the stream is closed now" errors. This meant that, due to go's pseudo-random channel selection, if the stream was closed and there were still messages in the stream (so, both `ch` and `errch` were select-able), then there was a chance that an adapter's `Recv()` would return `io.EOF` even though there were still responses to pull off the stream. This version moves to a more context-cancel like paradigm, using a separate context to check if the stream is closed. Then, we adjust the template for `Recv` to select: 1. Is stream context done 2. Is streamclosed context done 4. Does mid-stream error channel have an error 3. Does message channel have a message And the template for `Send` to: 1. If streamclosed context done, return `errStreamClosed`; otherwise 2. Send to the message channel and return nil <hr/> Note that this commit also makes a more public/exported API for bidiStream, to set up a simpler (diff-wise) filemove in a later change. Signed-off-by: Andrew Mason <[email protected]> Signed-off-by: tianshishuo <[email protected]>
…vt/vtctl` Turns out this construct is useful for writing stream-based unit tests for `grpcvtctldserver`, and this lets us reuse this code there without exporting it completely. Signed-off-by: Andrew Mason <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Andrew Mason <[email protected]> Signed-off-by: tianshishuo <[email protected]>
These were undocumented and broken, and they are no longer needed with the docker_local container being the preferred method for quick testing. Signed-off-by: Matt Lord <[email protected]> Signed-off-by: tianshishuo <[email protected]>
… command path Signed-off-by: Andrew Mason <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Matt Lord <[email protected]> Signed-off-by: tianshishuo <[email protected]>
We already do this for BLOB and VARBINARY Signed-off-by: Matt Lord <[email protected]> Signed-off-by: tianshishuo <[email protected]>
…e server behavior by version Signed-off-by: Shlomi Noach <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]> Signed-off-by: tianshishuo <[email protected]>
Signed-off-by: tianshishuo <[email protected]>
There are, for some reason, 98 commits in this PR now. It looks like you screwed up a merge or a rebase. You'll need to fix this into (ideally) a single commit so we can review. Thanks! |
Description
evalengine: Support built-in MySQL functions--abs()
Related Issue(s)
Contributes to evalengine: Support all built-in MySQL functions
Checklist
Deployment Notes