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

expression: fix `cast(-num as datetime)` to return null instead of error #10368

Merged
merged 8 commits into from May 8, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

fix CI

  • Loading branch information...
qw4990 committed May 6, 2019
commit c3b1086066d387f318910fd52a60e1bef75a16fc
@@ -2333,18 +2333,18 @@ func (s *testEvaluatorSuite) TestConvertTz(c *C) {
Success bool
expect string
}{
//{"2004-01-01 12:00:00.111", "-00:00", "+12:34", true, "2004-01-02 00:34:00.111"},
//{"2004-01-01 12:00:00.11", "+00:00", "+12:34", true, "2004-01-02 00:34:00.11"},
//{"2004-01-01 12:00:00.11111111111", "-00:00", "+12:34", true, "2004-01-02 00:34:00.111111"},
//{"2004-01-01 12:00:00", "GMT", "MET", true, "2004-01-01 13:00:00"},
//{"2004-01-01 12:00:00", "-01:00", "-12:00", true, "2004-01-01 01:00:00"},
//{"2004-01-01 12:00:00", "-00:00", "+13:00", true, "2004-01-02 01:00:00"},
//{"2004-01-01 12:00:00", "-00:00", "-13:00", true, ""},
//{"2004-01-01 12:00:00", "-00:00", "-12:88", true, ""},
//{"2004-01-01 12:00:00", "+10:82", "GMT", false, ""},
//{"2004-01-01 12:00:00", "+00:00", "GMT", true, ""},
//{"2004-01-01 12:00:00", "GMT", "+00:00", true, ""},
//{20040101, "+00:00", "+10:32", true, "2004-01-01 10:32:00"},
{"2004-01-01 12:00:00.111", "-00:00", "+12:34", true, "2004-01-02 00:34:00.111"},
{"2004-01-01 12:00:00.11", "+00:00", "+12:34", true, "2004-01-02 00:34:00.11"},
{"2004-01-01 12:00:00.11111111111", "-00:00", "+12:34", true, "2004-01-02 00:34:00.111111"},
{"2004-01-01 12:00:00", "GMT", "MET", true, "2004-01-01 13:00:00"},
{"2004-01-01 12:00:00", "-01:00", "-12:00", true, "2004-01-01 01:00:00"},
{"2004-01-01 12:00:00", "-00:00", "+13:00", true, "2004-01-02 01:00:00"},
{"2004-01-01 12:00:00", "-00:00", "-13:00", true, ""},
{"2004-01-01 12:00:00", "-00:00", "-12:88", true, ""},
{"2004-01-01 12:00:00", "+10:82", "GMT", false, ""},
{"2004-01-01 12:00:00", "+00:00", "GMT", true, ""},
{"2004-01-01 12:00:00", "GMT", "+00:00", true, ""},
{20040101, "+00:00", "+10:32", true, "2004-01-01 10:32:00"},
{3.14159, "+00:00", "+10:32", true, ""},
}
fc := funcs[ast.ConvertTz]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.