-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Refactor col defaults #1932
Refactor col defaults #1932
Conversation
…] ...) Verified matched MySQL behavior, which differs from documentation.
Use EvaluateCondition for conditions in join statements
Add support for json_contains_path()
Fixed case sensitivity bugs in various statements
parsed, err := planbuilder.Parse(ctx, e.Analyzer.Catalog, query) | ||
if err != nil { | ||
err2 := clearAutocommitTransaction(ctx) | ||
if err2 != nil { | ||
err = errors.Wrap(err, "unable to clear autocommit transaction: "+err2.Error()) |
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.
Better to return an err from here directly rather than letting happen by code outside the block
Same comment on the lines below
@@ -362,14 +363,15 @@ func injectBindVarsAndPrepare( | |||
) (string, map[string]*querypb.BindVariable, error) { | |||
parsed, err := sqlparser.Parse(q) | |||
if err != nil { | |||
return q, nil, err | |||
return q, nil, sql.ErrSyntaxError.New(err) |
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 wrapping necessary here?
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.
Some error tests expected this errors.Kind
. I could also change the tests
@@ -178,6 +178,11 @@ type PrimaryKeySchemaTarget interface { | |||
WithPrimaryKeySchema(schema PrimaryKeySchema) (Node, error) | |||
} | |||
|
|||
type DynamicColumnsTable interface { |
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.
Needs a comment, same with method names
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.
Should also give this a boolean HasDynamicColumns() bool
to make it clearer as a marker interface
Dolt column defaults work differently than GMS's. This inlines resolving column defaults during name resolution to get closer to Dolt's desired behavior.