sd4324530 commented on issue #2325:
URL: https://github.com/apache/fluss/issues/2325#issuecomment-3726576952

   Here is my solution:
   The definition of the 'call' method can be adjusted like this:
   ```java
   @ProcedureHint(
               argument = {
                   @ArgumentHint(
                           name = "rebalanceId",
                           type = @DataTypeHint("STRING"),
                           isOptional = true)
               },
               output =
                       @DataTypeHint(
                               "ROW<rebalance_id STRING, rebalance_status 
STRING, rebalance_progress STRING, rebalance_plan STRING>"))
       public Row[] call(ProcedureContext context, @Nullable String 
rebalanceId) throws Exception
   ```
   
   The content of the `rebalance_plan` field is the JSON-formatted string of 
`RebalanceResultForBucket.plan` list in the result, like:
   ```java
   for (RebalanceResultForBucket resultForBucket : bucketMap.values()) {
               result.add(resultForBucket.plan());
           }
   ```
   Because `rebalanceStatus` already exists.
   @swuferhong What do you think?
   


-- 
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]

Reply via email to