-
-
Notifications
You must be signed in to change notification settings - Fork 234
Fix prep AS OF #1054
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
Fix prep AS OF #1054
Conversation
to, err = resolveTable(ctx, plan.NewUnresolvedTable(n.Name(), db), a) | ||
var asof sql.Expression | ||
if n.AsOf != nil { | ||
asof = expression.NewLiteral(n.AsOf, nil) |
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.
Why is this conversion step necessary? Why not just resolveTable(plan.NewUnresolvedTableAsOf(n.name, db, n.AsOf)
?
to, err = resolveTable(ctx, plan.NewUnresolvedTable(n.Name(), db), a) | ||
var asof sql.Expression | ||
if n.AsOf != nil { | ||
asof = expression.NewLiteral(n.AsOf, nil) |
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.
Why is this conversion step necessary? Why not just resolveTable(plan.NewUnresolvedTableAsOf(n.name, db, n.AsOf)
?
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.
The constructor expected an sql.Expression argument
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.
I could do more work to clean up asof handling/do a type inference if you want
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.
Where is the test case that would have caught this?
Prepared AS OFs errored when the asof target was not a bindvar. All of our previous tests treated ASOF also as a bindvar.
companion PR: dolthub/dolt#3592