Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions enginetest/join_op_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ var joinOpTests = []struct {
setup.XyData[0],
},
tests: []JoinOpTests{
{
Query: `SELECT * from xy join uv on x = u and y = NOW()`,
Expected: []sql.Row{},
},
{
Query: `SELECT xy.x, xy.y
FROM xy
Expand Down
3 changes: 3 additions & 0 deletions sql/expression/function/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,9 @@ func (n *Now) Children() []sql.Expression { return nil }

// Eval implements the sql.Expression interface.
func (n *Now) Eval(ctx *sql.Context, _ sql.Row) (interface{}, error) {
if ctx == nil {
return nil, fmt.Errorf("cannot Eval Now with nil context")
}
t := ctx.QueryTime()
// TODO: Now should return a string formatted depending on context. This code handles string formatting
// and should be enabled at the time we fix the return type
Expand Down