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

Support update pump or drainer status #1

Merged
merged 3 commits into from
Mar 14, 2019

Conversation

WangXiangUSTC
Copy link

What problem does this PR solve?

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

// Restore implements Node interface.
func (n *ChangePumpStmt) Restore(ctx *RestoreCtx) error {
ctx.WriteKeyWord("CHANGE PUMP TO")
ctx.WriteString("PUMP_STATE")
Copy link

Choose a reason for hiding this comment

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

This should be part of the WriteKeyWord above unless you want the syntax to be CHANGE PUMP TO 'PUMP_STATE' = 'stuff' ...

ctx.WritePlain("=")
ctx.WriteString(n.State)
ctx.WriteKeyWord("FOR NodeID")
ctx.WriteKeyWord(n.IpAndPort)
Copy link

Choose a reason for hiding this comment

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

Suggested change
ctx.WriteKeyWord(n.IpAndPort)
ctx.WriteString(n.IpAndPort)

@@ -5513,6 +5517,22 @@ UnionSelect:
UnionOpt:
DefaultTrueDistinctOpt

/********************Change Statement*******************************/
ChangeStmt:
| "CHANGE" "PUMP" to "PUMP_STATE" eq stringLit forKwd "NODEID" stringLit
Copy link

Choose a reason for hiding this comment

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

Suggested change
| "CHANGE" "PUMP" to "PUMP_STATE" eq stringLit forKwd "NODEID" stringLit
"CHANGE" "PUMP" to "PUMP_STATE" eq stringLit forKwd "NODEID" stringLit

@aliiohs aliiohs merged commit 926ac46 into master Mar 14, 2019
@aliiohs aliiohs deleted the support_update_Pump_or_Drainer_status branch March 14, 2019 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants