warren830 commented on code in PR #3513:
URL:
https://github.com/apache/incubator-devlake/pull/3513#discussion_r1001562313
##########
helpers/e2ehelper/data_flow_tester.go:
##########
@@ -469,3 +484,48 @@ func (t *DataFlowTester) VerifyTableWithOptions(dst
schema.Tabler, opts TableOpt
}
assert.Equal(t.T, expectedTotal, actualTotal, fmt.Sprintf(`%s count not
match`, dst.TableName()))
}
+
+// fieldCheck will hold all fields and relevant values
+type fieldCheck map[string][]interface{}
+
+// feedInRawTable will add value of fields to a list, later we will use this
list to judge diversity
+func (f fieldCheck) feedInRawTable(toInsertValues map[string]interface{}) {
+ for k, v := range toInsertValues {
+ if k == `created_at` || (k == `input` && v == `null`) || k ==
`url` {
+ continue
+ }
+ if f[k] == nil {
+ valueList := make([]interface{}, 0)
+ valueList = append(valueList, v)
+ f[k] = valueList
+ } else {
+ if v != f[k][0] {
+ f[k] = append(f[k], v)
+ }
+ }
+ }
+}
+
+// feedInSnapshotTable will add value of fields(only targetFields) to a list,
later we will use this list to judge diversity
+func (f fieldCheck) feedInSnapshotTable(toInsertValues map[string]interface{},
targetFields map[string]bool) {
Review Comment:
no, you are correct, here we are putting data of snapshot table into
`checker`
--
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]