-
Notifications
You must be signed in to change notification settings - Fork 316
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
[Polish] Code polish #2105
[Polish] Code polish #2105
Conversation
@shidayang PTAL. |
Thank you for your contribution. There are some formatting issues in the code that caused the CI to fail. Could you please fix them? |
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.
Thanks a lot for your contribution!
I noticed that you used the wrong indent configuration to format the code. You may need to reconfigure and reformat it.
.append('.') | ||
.append(database) | ||
.toString(); | ||
return name() + |
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.
The project use 2 spaces as indent and tab size, you may reconfigure it an reformat the codes here.
What is the standard for this code specification? Are there any relevant checking tools to detect whether the code meets the standard? Is this standardization of the code a one-time event or can it be continuously enforced? It seems like a one-time optimization, and there is no guarantee that subsequent submissions will meet the relevant constraints. Can checks be added in Github CI? |
The community is currently promoting another initiative to use the googleJavaFormatter + spotless plugin to format the code, please refer to this issue #1402. Is the goal of this PR consistent with that initiative? |
1a81794
to
3009681
Compare
Codecov ReportAttention:
... and 6 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
e8837c7
to
566de76
Compare
@zhoujinsong @shidayang @baiyangtx PTAL , Thank you~ |
LGTM |
566de76
to
365e62f
Compare
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.
Thanks a lot for your contribution!
...izer/common/src/main/java/com/netease/arctic/optimizer/common/AbstractOptimizerOperator.java
Outdated
Show resolved
Hide resolved
core/src/test/java/com/netease/arctic/utils/map/TestStructLikeMap.java
Outdated
Show resolved
Hide resolved
void alterPartition(String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext) | ||
throws InvalidOperationException, MetaException, TException, ClassNotFoundException, | ||
throws TException, ClassNotFoundException, | ||
NoSuchMethodException, InvocationTargetException, IllegalAccessException; | ||
|
||
Partition getPartition(String dbName, String tblName, | ||
List<String> partVals) throws NoSuchObjectException, MetaException, TException; | ||
List<String> partVals) throws TException; | ||
|
||
Partition getPartition(String dbName, String tblName, | ||
String name) throws MetaException, UnknownTableException, NoSuchObjectException, TException; | ||
String name) throws TException; | ||
|
||
Table getTable(String dbName, String tableName) throws MetaException, | ||
TException, NoSuchObjectException; | ||
Table getTable(String dbName, String tableName) throws | ||
TException; | ||
|
||
void alterTable(String defaultDatabaseName, String tblName, | ||
Table table) throws InvalidOperationException, MetaException, TException; | ||
Table table) throws TException; | ||
|
||
List<Partition> listPartitions(String dbName, String tblName, | ||
short maxParts) throws NoSuchObjectException, MetaException, TException; | ||
short maxParts) throws TException; | ||
|
||
List<Partition> listPartitions(String dbName, String tblName, | ||
List<String> partVals, short maxParts) | ||
throws NoSuchObjectException, MetaException, TException; | ||
throws TException; | ||
|
||
List<String> listPartitionNames(String dbName, String tblName, | ||
short maxParts) throws MetaException, TException; | ||
short maxParts) throws TException; | ||
|
||
|
||
void createDatabase(Database db) | ||
throws InvalidObjectException, AlreadyExistsException, MetaException, TException; | ||
throws TException; | ||
|
||
void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb, boolean cascade) | ||
throws NoSuchObjectException, InvalidOperationException, MetaException, TException; | ||
throws TException; | ||
|
||
void dropTable(String dbname, String tableName, boolean deleteData, | ||
boolean ignoreUnknownTab) throws MetaException, TException, | ||
NoSuchObjectException; | ||
boolean ignoreUnknownTab) throws TException; | ||
|
||
void createTable(Table tbl) throws AlreadyExistsException, | ||
InvalidObjectException, MetaException, NoSuchObjectException, TException; | ||
void createTable(Table tbl) throws | ||
TException; | ||
|
||
Database getDatabase(String databaseName) | ||
throws NoSuchObjectException, MetaException, TException; | ||
throws TException; | ||
|
||
Partition addPartition(Partition partition) | ||
throws InvalidObjectException, AlreadyExistsException, MetaException, TException; | ||
throws TException; | ||
|
||
boolean dropPartition(String dbName, String tblName, List<String> partVals, | ||
PartitionDropOptions options) throws TException; | ||
|
||
int addPartitions(List<Partition> partitions) | ||
throws InvalidObjectException, AlreadyExistsException, MetaException, TException; | ||
throws TException; | ||
|
||
|
||
List<String> getAllTables(String dbName) throws MetaException, TException, UnknownDBException; | ||
List<String> getAllTables(String dbName) throws TException; |
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.
It makes sense to throw more semantically clear exceptions in an interface.
365e62f
to
988f7a3
Compare
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.
LGTM!
Thanks a lot for your great work!
* exclude flink * fix ci * fix ci * test ci * test ci * polish flink 1.15 * add polish code * Address comment * Address comment
Polish code