SteNicholas commented on a change in pull request #4117: add visitor for dal
URL:
https://github.com/apache/incubator-shardingsphere/pull/4117#discussion_r373860099
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/MySQLVisitor.java
##########
@@ -237,7 +284,42 @@ public ASTNode visitShowTableStatus(final
ShowTableStatusContext ctx) {
}
return showTableStatusStatement;
}
-
+
+ @Override
+ public ASTNode visitShowColumns(final ShowColumnsContext ctx) {
+ ShowColumnsStatement showColumnsStatement = new ShowColumnsStatement();
+ FromSchemaContext fromSchemaContext = ctx.fromSchema();
+ ShowLikeContext showLikeContext = ctx.showLike();
+ if (null != fromSchemaContext) {
+ FromSchemaSegment fromSchemaSegment = (FromSchemaSegment)
visit(ctx.fromSchema());
+ showColumnsStatement.getAllSQLSegments().add(fromSchemaSegment);
+ }
+ if (null != showLikeContext) {
+ ShowLikeSegment showLikeSegment = (ShowLikeSegment)
visit(ctx.showLike());
+ showColumnsStatement.getAllSQLSegments().add(showLikeSegment);
+ }
+ return showColumnsStatement;
+ }
+
+ @Override
+ public ASTNode visitShowIndex(final ShowIndexContext ctx) {
+ ShowIndexStatement showIndexStatement = new ShowIndexStatement();
Review comment:
Similar to above.
----------------------------------------------------------------
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