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

add visitor for setVariable of mysql #4228

Merged
merged 3 commits into from
Feb 11, 2020
Merged

Conversation

jingshanglu
Copy link
Contributor

@jingshanglu jingshanglu commented Feb 10, 2020

For #3914 .

Changes proposed in this pull request:

  • add visitor for setVariable
  • add visitor for showOther
  • add test for showColumus, setVariable,showCreateTable

@jingshanglu jingshanglu requested review from terrymanu and tristaZero and removed request for terrymanu February 10, 2020 12:15
@codecov-io
Copy link

codecov-io commented Feb 10, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@ec7dde4). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4228   +/-   ##
=========================================
  Coverage          ?   60.76%           
  Complexity        ?      352           
=========================================
  Files             ?     1013           
  Lines             ?    17036           
  Branches          ?     3005           
=========================================
  Hits              ?    10352           
  Misses            ?     6031           
  Partials          ?      653

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec7dde4...9586ecb. Read the comment docs.

@coveralls
Copy link

coveralls commented Feb 10, 2020

Pull Request Test Coverage Report for Build 9435

  • 0 of 15 (0.0%) changed or added relevant lines in 3 files are covered.
  • 302 unchanged lines in 29 files lost coverage.
  • Overall coverage increased (+0.2%) to 64.657%

Changes Missing Coverage Covered Lines Changed/Added Lines %
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/statement/dal/dialect/mysql/SetStatement.java 0 1 0.0%
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dal/FromTableSegment.java 0 1 0.0%
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/visitor/MySQLDALVisitor.java 0 13 0.0%
Files with Coverage Reduction New Missed Lines %
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/listener/AuthenticationChangedListener.java 1 75.0%
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/listener/PropertiesChangedListener.java 1 75.0%
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/listener/SchemaChangedListener.java 1 97.5%
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/state/listener/DataSourceStateChangedListener.java 1 85.71%
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/state/listener/InstanceStateChangedListener.java 1 75.0%
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/sql/segment/dml/column/ColumnSegment.java 1 50.0%
sharding-spring/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/spring/datasource/OrchestrationSpringEncryptDataSource.java 1 50.0%
sharding-spring/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/spring/datasource/OrchestrationSpringMasterSlaveDataSource.java 1 50.0%
sharding-spring/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/spring/datasource/OrchestrationSpringShardingDataSource.java 1 50.0%
shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/extractor/impl/common/schema/SchemaExtractor.java 2 66.67%
Totals Coverage Status
Change from base Build 9428: 0.2%
Covered Lines: 11015
Relevant Lines: 17036

💛 - Coveralls

@terrymanu terrymanu self-requested a review February 10, 2020 14:33
Copy link
Member

@terrymanu terrymanu left a comment

Choose a reason for hiding this comment

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

The comment Fixes #3914 will close the #3914, but the issue is not finished yet.

@tristaZero
Copy link
Contributor

tristaZero commented Feb 10, 2020

@terrymanu Hi, i guess you are reviewing this PR, so is it necessary for me to give it a look?


@RequiredArgsConstructor
@Getter
public class VariableExprSegment implements SQLSegment {
Copy link
Member

Choose a reason for hiding this comment

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

  1. Missing java doc
  2. Can the class be final?

private final String variable;

private final String expr;

Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary blank lines


@RequiredArgsConstructor
@Getter
public class VariableExprSegment implements SQLSegment {
Copy link
Member

Choose a reason for hiding this comment

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

We prefer do not use abbreviation.
Please rename expr to expression


private final String variable;

private final String expr;
Copy link
Member

Choose a reason for hiding this comment

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

We prefer do not use abbreviation.
Please rename expr to expression

import java.util.List;

/**
* set variable statement test case.
Copy link
Member

Choose a reason for hiding this comment

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

First letter of java doc should be upper case.

@Setter
public final class SetVariableStatementTestCase extends SQLParserTestCase {

@XmlElement(name = "variable-expr")
Copy link
Member

Choose a reason for hiding this comment

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

Please do not use abbreviation, please rename variable-expr to variable-expression

Comment on lines 40 to 41


Copy link
Member

Choose a reason for hiding this comment

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

Please remove unnecessary blank lines.

Comment on lines 34 to 35


Copy link
Member

Choose a reason for hiding this comment

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

Please remove unnecessary blank lines.

@jingshanglu
Copy link
Contributor Author

The comment Fixes #3914 will close the #3914, but the issue is not finished yet.

@terrymanu What should be written?

@terrymanu
Copy link
Member

The comment Fixes #3914 will close the #3914, but the issue is not finished yet.

@terrymanu What should be written?

Maybe For #3914 or just #3914

Copy link
Member

@terrymanu terrymanu left a comment

Choose a reason for hiding this comment

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

There are still some place need to be fix, but we have not time to waiting.
Because of the PR I wrote will conflict with this PR.

I will merge and revise it for next PR, please pay attention.

@terrymanu terrymanu added this to the 5.0.0 milestone Feb 11, 2020
@terrymanu terrymanu merged commit 655d4a0 into apache:master Feb 11, 2020
@terrymanu terrymanu mentioned this pull request Feb 11, 2020
tuohai666 pushed a commit that referenced this pull request Feb 11, 2020
@terrymanu
Copy link
Member

Please pay attention for #4233

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.

None yet

5 participants