guoyuepeng commented on a change in pull request #538: [GRIFFIN-289]New feature 
for griffin COMPLETENESS dq type
URL: https://github.com/apache/griffin/pull/538#discussion_r327103843
 
 

 ##########
 File path: 
measure/src/main/scala/org/apache/griffin/measure/step/builder/dsl/transform/CompletenessExpr2DQSteps.scala
 ##########
 @@ -85,8 +85,16 @@ case class CompletenessExpr2DQSteps(context: DQContext,
 
       // 2. incomplete record
       val incompleteRecordsTableName = "__incompleteRecords"
-      val completeWhereClause = aliases.map(a => s"`${a}` IS NOT 
NULL").mkString(" AND ")
-      val incompleteWhereClause = s"NOT (${completeWhereClause})"
+      val errorConfs: Seq[RuleErrorConfParam] = ruleParam.getErrorConfs
+      var incompleteWhereClause: String = ""
+      if (errorConfs.size == 0) {
+        // old completeness way
+        val completeWhereClause = aliases.map(a => s"`${a}` IS NOT 
NULL").mkString(" AND ")
+        incompleteWhereClause = s"NOT (${completeWhereClause})"
+      } else {
+        // new completeness way
 
 Review comment:
   can we comment here as "with errorconf".

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

Reply via email to