Improve diagnostic messages in JdbcExecutor when resolving execution tasks#714
Improve diagnostic messages in JdbcExecutor when resolving execution tasks#714mohit-devlogs wants to merge 3 commits intoapache:mainfrom
Conversation
|
Hi @mohit-devlogs we will take a look at your PR but until then I am wondering why you have removed the comments the code had. |
Thank you for pointing this out. As for the comments, these were not supposed to be removed. When I modified the code to enhance the diagnostic information, it appears that I inadvertently modified the code block, resulting in the removal of the comments. I will restore the original comments and update the PR so that it only contains the intended diagnostic improvements. |
| filterTasks.add(filterOperator); | ||
| } else if (nextTask.getOperator() instanceof JdbcProjectionOperator projectionOperator) { | ||
| assert projectionTask == null; // Allow one projection operator per stage for now. | ||
| assert projectionTask == null; |
There was a problem hiding this comment.
put back the comment please
There was a problem hiding this comment.
Thanks for pointing this out. I have restored the missing comment.
The current implementation of the method
findJdbcExecutionOperatorTaskInStagerelies on the use of assertions andWayangCollections.getSinglefor the acquisition of the consumer of the output channel.When the assumptions are not met, the error messages given, such as "[] is not a singleton", are not very clear and do not assist very much for debugging purposes.
In the current code, the assumptions have been replaced with validations and
WayangException.