Skip to content
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

parser,ast: fix the TiDB issue #8153 #20

Merged
merged 1 commit into from
Nov 7, 2018
Merged

parser,ast: fix the TiDB issue #8153 #20

merged 1 commit into from
Nov 7, 2018

Conversation

dbjoa
Copy link
Contributor

@dbjoa dbjoa commented Nov 6, 2018

The TiDB PR 8206 requires this PR.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

zz-jason commented Nov 6, 2018

@winoros @eurekaka PTAL

return n, false
}
n.N = node.(ExprNode)
}
n = newNode.(*PositionExpr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this line before the added check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment. I've updated the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean like this:

n = newNode.(*PositionExpr)
if n.N != nil {
    node, ok := n.N.Accept(v)
    if !ok {
        return n, false
    }
    n.N = node.(ExprNode)
}

we should modify newNode.N instead of n.N?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the correction. I've updated the PR.

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Nov 7, 2018
@eurekaka eurekaka merged commit 8063822 into pingcap:master Nov 7, 2018
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants