-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 parse opengauss create index #28291
Conversation
hello @strongduanmu, can you give advice how to fix the failing checks. I find the log shows zookeeper session closed. But I don't know it is anything wrong with the code changes or just the environment issue. |
Can you run GeneralDQLE2EIT on your local machine? |
I can run GeneralDQLE2EIT, and there is no error on my local |
You can modify it-env.props according to fail e2e test case. |
I have run the e2e test, and everything is OK. I run this: |
this PR will migrate to milestone 5.4.2 |
Hi @tmyVvit, can you merge master branch to keep code consistent with the master branch? |
Sure! I will merge it tonight
Zhengqiang Duan ***@***.***>于2023年10月8日 周日13:59写道:
… Hi @tmyVvit <https://github.com/tmyVvit>, can you merge master branch to
keep code consistent with the master branch?
—
Reply to this email directly, view it on GitHub
<#28291 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQQGUSOA2EATOP5ZSYYLNLX6I6MRAVCNFSM6AAAAAA4BSAZ6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRHEZTAOJQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tmyVvit, thank you for your great contribution. There are a few minor issues you need to take a look at.
@@ -348,6 +361,7 @@ partitionCmd | |||
|
|||
alterIndexDefinitionClause | |||
: renameIndexSpecification | alterIndexDependsOnExtension | alterIndexSetTableSpace | alterTableCmds | indexPartitionCmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write the rules one by one? According to the code specification, when there are more than 5 branches, a rule needs to be written one line.
@Override | ||
public ASTNode visitCreateIndexPartitionClause(final OpenGaussStatementParser.CreateIndexPartitionClauseContext ctx) { | ||
IndexPartitionTypeEnum indexPartitionType = null; | ||
if (ctx.LOCAL() != null || ctx.GLOBAL() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put null codition on the left side.
} | ||
|
||
@Override | ||
public ASTNode visitIndexPartitionElemList(final OpenGaussStatementParser.IndexPartitionElemListContext ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please import subclass directly.
} | ||
|
||
@Override | ||
public ASTNode visitIndexPartitionElem(final OpenGaussStatementParser.IndexPartitionElemContext ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please import subclass directly.
private final int stopIndex; | ||
|
||
private final IdentifierValue identifier; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless blank line.
|
||
package org.apache.shardingsphere.sql.parser.sql.dialect.statement.opengauss.segment; | ||
|
||
public enum IndexPartitionTypeEnum { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add javadoc for this class.
|
||
@RequiredArgsConstructor | ||
@Getter | ||
public class IndexPartitionsSegment implements AlterDefinitionSegment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final and javadoc for this class.
@RequiredArgsConstructor | ||
@Getter | ||
@Setter | ||
public class MovePartitionSegment implements SQLSegment { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final and javadoc for this class.
...hardingsphere/sql/parser/sql/dialect/statement/opengauss/segment/RenamePartitionSegment.java
Outdated
Show resolved
Hide resolved
} else { | ||
assertTrue(ogActual.getMovePartition().isPresent(), assertContext.getText("Actual move partition should exist.")); | ||
MovePartitionSegment actualMovePartition = ogActual.getMovePartition().get(); | ||
// assert partition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless inline comment.
Hi @strongduanmu, thanks your suggestion, I have fixed the issues |
Since this pr has long time no response, I will close it. You can submit new pr when you are free. |
Fixes #27862
Changes proposed in this pull request:
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.