-
Notifications
You must be signed in to change notification settings - Fork 5.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
expression: fix cast invalid string to datetime #26726
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/cc @guo-shaoge @wshwsh12 |
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.
Please add some test cases for your modify.
For example.
MySQL [test]> select cast('e' as date);
+-------------------+
| cast('e' as date) |
+-------------------+
| NULL |
+-------------------+
@wzru |
@wzru: PR needs rebase. 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. |
@@ -1696,8 +1696,6 @@ func (b *builtinCastStringAsTimeSig) vecEvalTime(input *chunk.Chunk, result *chu | |||
if err = handleInvalidTimeError(b.ctx, err); err != nil { | |||
return err | |||
} | |||
result.SetNull(i, true) |
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.
Should we use b.ctx.GetSessionVars().StrictSQLMode?
@wzru Do you have time to finish this PR? If there is no reply within a week, I will close the PR and take over the job. |
@hawkingrei Sorry for that. I don't have time yet. I will close this PR. |
Thank you for your contribution. |
What problem does this PR solve?
Issue Number: close #24997
Problem Summary:
Simplified case:
MySQL:
TiDB:
What is changed and how it works?
What's Changed:
func (b *builtinCastStringAsTimeSig) vecEvalTime
func (b *builtinCastStringAsTimeSig) evalTime
How it Works:
Check List
Tests
Side effects
Release note