sandynz commented on code in PR #20521:
URL: https://github.com/apache/shardingsphere/pull/20521#discussion_r954881400
##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/main/java/org/apache/shardingsphere/data/pipeline/api/pojo/MigrationJobInfo.java:
##########
@@ -17,11 +17,21 @@
package org.apache.shardingsphere.data.pipeline.api.pojo;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
/**
* Migration job info.
*/
+
+@Setter
+@Getter
+@ToString
public class MigrationJobInfo extends PipelineJobInfo {
Review Comment:
Class could be final
##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/main/java/org/apache/shardingsphere/data/pipeline/api/pojo/MigrationJobInfo.java:
##########
@@ -17,11 +17,21 @@
package org.apache.shardingsphere.data.pipeline.api.pojo;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
/**
* Migration job info.
*/
+
+@Setter
+@Getter
+@ToString
Review Comment:
`@ToString` might need to call super
##########
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/migration/distsql/handler/query/ShowMigrationListQueryResultSet.java:
##########
@@ -43,13 +44,14 @@ public final class ShowMigrationListQueryResultSet
implements DatabaseDistSQLRes
public void init(final ShardingSphereDatabase database, final SQLStatement
sqlStatement) {
data = JOB_API.list().stream()
.map(each -> {
+ MigrationJobInfo jobInfo = (MigrationJobInfo) each;
Collection<Object> result = new LinkedList<>();
Review Comment:
Could we imporve the return type of public API `list()` definition?
So `MigrationJobPublicAPI.list()` could return List of `MigrationJobInfo`,
to avoid job info class cast.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]