PnPie commented on a change in pull request #562: [GRIFFIN-316] Fix job
exception handling
URL: https://github.com/apache/griffin/pull/562#discussion_r364763430
##########
File path: measure/src/main/scala/org/apache/griffin/measure/job/DQJob.scala
##########
@@ -25,8 +27,16 @@ case class DQJob(dqSteps: Seq[DQStep]) extends Serializable
{
/**
* @return execution success
*/
- def execute(context: DQContext): Boolean = {
- dqSteps.forall(dqStep => dqStep.execute(context))
+ def execute(context: DQContext): Try[Boolean] = {
+ val tmp = dqSteps.map(dqStep => dqStep.execute(context))
Review comment:
I changed the `.execute` method inside and they return a `Try[Boolean]`
instance, which wraps the failure potentially be raised.
In the test case added, the spark sql `AnalysisException` is actually raised
here from `.execute` method.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services