[GitHub] [griffin] guoyuepeng commented on a change in pull request #526: [GRIFFIN-283] Move sink steps into TransformStep

2019-08-25 Thread GitBox
guoyuepeng commented on a change in pull request #526: [GRIFFIN-283] Move sink 
steps into TransformStep
URL: https://github.com/apache/griffin/pull/526#discussion_r317418254
 
 

 ##
 File path: 
measure/src/main/scala/org/apache/griffin/measure/step/transform/DataFrameOpsTransformStep.scala
 ##
 @@ -19,14 +19,16 @@ under the License.
 package org.apache.griffin.measure.step.transform
 
 import org.apache.griffin.measure.context.DQContext
+import org.apache.griffin.measure.step.write.WriteStep
 
 /**
   * data frame ops transform step
   */
-case class DataFrameOpsTransformStep(name: String,
+case class DataFrameOpsTransformStep[T <: WriteStep](name: String,
  inputDfName: String,
  rule: String,
  details: Map[String, Any],
+ writeStepOpt: Option[T] = None,
 
 Review comment:
   LGTM


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [griffin] guoyuepeng commented on a change in pull request #526: [GRIFFIN-283] Move sink steps into TransformStep

2019-08-23 Thread GitBox
guoyuepeng commented on a change in pull request #526: [GRIFFIN-283] Move sink 
steps into TransformStep
URL: https://github.com/apache/griffin/pull/526#discussion_r317147333
 
 

 ##
 File path: 
measure/src/main/scala/org/apache/griffin/measure/step/builder/dsl/transform/Expr2DQSteps.scala
 ##
 @@ -32,6 +33,10 @@ trait Expr2DQSteps extends Loggable with Serializable {
 
   def getDQSteps(): Seq[DQStep]
 
+  implicit def recoredWriteStepToList(writeStep: RecordWriteStep): 
List[WriteStep] = writeStep :: Nil
+
+  implicit def metricsWriteStepToList(writeStep: MetricWriteStep): 
List[WriteStep] = writeStep :: Nil
 
 Review comment:
   make sense to me . 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [griffin] guoyuepeng commented on a change in pull request #526: [GRIFFIN-283] Move sink steps into TransformStep

2019-08-22 Thread GitBox
guoyuepeng commented on a change in pull request #526: [GRIFFIN-283] Move sink 
steps into TransformStep
URL: https://github.com/apache/griffin/pull/526#discussion_r316921504
 
 

 ##
 File path: 
measure/src/main/scala/org/apache/griffin/measure/step/builder/dsl/transform/Expr2DQSteps.scala
 ##
 @@ -32,6 +33,10 @@ trait Expr2DQSteps extends Loggable with Serializable {
 
   def getDQSteps(): Seq[DQStep]
 
+  implicit def recoredWriteStepToList(writeStep: RecordWriteStep): 
List[WriteStep] = writeStep :: Nil
+
+  implicit def metricsWriteStepToList(writeStep: MetricWriteStep): 
List[WriteStep] = writeStep :: Nil
 
 Review comment:
   I also think implicitly convert WriteStep into List[WriteStep] is 
over-assumption. we should explicitly declare it when used. 
   @wankunde What is your opinion?
   If we have to change the interface, then we can change it to make dq chain 
more clear.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services