-
Notifications
You must be signed in to change notification settings - Fork 66
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
Logictest projections #258
Conversation
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.
nice!
@@ -62,6 +62,8 @@ func (v *astVisitor) leaveImpl(n ast.Node) error { | |||
v.exprStack[0], | |||
v.exprStack[1:]..., | |||
) | |||
default: |
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.
Is it correct to have this as the default
case? I guess previously we just returned all columns, so we do want to do a Project in all cases, is that right?
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 think we'd want to extend this to support something like select *
in the future, but I think for what we have now this is okay?
return "", fmt.Errorf("createtable: unexpected schema values %v", arg.Vals) | ||
} | ||
schema = r.defaultSchema | ||
schema = r.schemas[arg.Vals[0]] |
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.
nit: return an error if schema is not found
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.
We do below where we check if schema is nil
This adds Projection support to Logictests as well as adding support for additional schemas.