Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sql/(parse,expression): implement unary minus #456

Merged
merged 2 commits into from
Oct 19, 2018

Conversation

erizocosmico
Copy link
Contributor

Closes #444

@erizocosmico erizocosmico requested a review from a team October 16, 2018 09:59
}
}

switch n := child.(type) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need a case for regular int?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for:

var child interface{} = 10

it will go to the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there can't be ints in gitbase, either int32 or int64

@ajnavarro
Copy link
Contributor

@erizocosmico can you rebase please?

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico
Copy link
Contributor Author

Done

@ajnavarro
Copy link
Contributor

@erizocosmico could you add a test for:

case *sqlparser.UnaryExpr:
	return unaryExprToExpression(v)

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico
Copy link
Contributor Author

Done

@ajnavarro ajnavarro merged commit 4095f3d into src-d:master Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants