Skip to content

Commit

Permalink
test: add a failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <manan@planetscale.com>
  • Loading branch information
GuptaManan100 committed Dec 26, 2024
1 parent 83f2aab commit 44c1dc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/vt/vtgate/evalengine/compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,10 @@ func TestCompilerSingle(t *testing.T) {
expression: `cast(_utf32 0x0000FF as binary)`,
result: `VARBINARY("\x00\x00\x00\xff")`,
},
{
expression: `DATE_FORMAT(timestamp '2024-12-30 10:34:58', "%u");`,
result: `VARCHAR("53")`,
},
}

tz, _ := time.LoadLocation("Europe/Madrid")
Expand Down
1 change: 1 addition & 0 deletions go/vt/vtgate/evalengine/testcases/inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ var inputConversions = []string{
"time '10:04:58'", "time '31:34:58'", "time '32:34:58'", "time '130:34:58'", "time '5 10:34:58'",
"time '10:04:58.1'", "time '31:34:58.4'", "time '32:34:58.5'", "time '130:34:58.6'", "time '5 10:34:58.9'", "date '2000-01-01'",
"timestamp '2000-01-01 10:34:58'", "timestamp '2000-01-01 10:34:58.123456'", "timestamp '2000-01-01 10:34:58.978654'",
"timestamp '2024-12-30 10:34:58'",
"20000101103458", "20000101103458.1234", "20000101103458.123456", "20000101", "103458", "103458.123456",
"'20000101103458'", "'20000101103458.1234'", "'20000101103458.123456'", "'20000101'", "'103458'", "'103458.123456'",
"'20000101103458foo'", "'20000101103458.1234foo'", "'20000101103458.123456foo'", "'20000101foo'", "'103458foo'", "'103458.123456foo'",
Expand Down

0 comments on commit 44c1dc2

Please sign in to comment.