beijing-penguin commented on a change in pull request #4477: Parse mysql
variable value for SET statement
URL:
https://github.com/apache/incubator-shardingsphere/pull/4477#discussion_r388374788
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/asserts/statement/dal/impl/SetVariableStatementAssert.java
##########
@@ -42,11 +42,12 @@
* @param expected expected variable statement test case
*/
public static void assertIs(final SQLCaseAssertContext assertContext,
final SetStatement actual, final SetVariableStatementTestCase expected) {
- if (null != expected.getVariable()) {
- assertNotNull(assertContext.getText("Actual variable expression
should exist."), actual.getVariable());
- assertThat(assertContext.getText("variable expression assertion
error: "), actual.getVariable().getVariable(), is(expected.getVariable()));
+ if (null != expected.getVariableName()) {
+ assertNotNull(assertContext.getText("Actual variable expression
should exist."), actual.getVariableExprList());
+ assertThat(assertContext.getText("variable expression assertion
error: "), actual.getVariableExprList().get(0).getVariable().getVariableName(),
is(expected.getVariableName()));
Review comment:
yes,i know ,but this time code have commit too much file,I want to optimize
multivariable test on next time....there code will can check a single variable
and a single variable value..
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services