@@ -250,11 +250,12 @@ func (sp *standardParamSplitter) assembleSplitParams(
250250 combinations := combinationComposerObj .getCombinations ()
251251 _ , isAnythingSplit := len (combinations ), combinationComposerObj .getIsAnythingSplit ()
252252 for _ , paramCombination := range combinations {
253+ com := paramCombination
253254 splitAnnotationCtx := taxonomy .NewStaticStandardAnnotationCtx (
254255 rawAnnotationCtx .GetSchema (),
255256 rawAnnotationCtx .GetHIDs (),
256257 rawAnnotationCtx .GetTableMeta ().Clone (),
257- paramCombination ,
258+ com ,
258259 )
259260 sp .splitAnnotationContextMap .Put (rawAnnotationCtx , splitAnnotationCtx )
260261 // TODO: this has gotta replace the original and also be duplicated
@@ -310,6 +311,8 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
310311 }
311312 var dependencyTable sqlparser.TableExpr
312313 var dependencies []taxonomy.AnnotationCtx
314+ var destinations []taxonomy.AnnotationCtx
315+
313316 var destColumn * sqlparser.ColName
314317 var srcExpr sqlparser.Expr
315318 switch l := k .Left .(type ) {
@@ -329,6 +332,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
329332 } else {
330333 dependencies = append (dependencies , lhr )
331334 }
335+ splitDestinations , isDestinationSplit := splitAnnotationContextMap .Get (destHierarchy )
336+ if isDestinationSplit {
337+ destinations = append (destinations , splitDestinations ... )
338+ } else {
339+ destinations = append (destinations , destHierarchy )
340+ }
332341 dependencyTable = candidateTable
333342 srcExpr = k .Left
334343 }
@@ -343,6 +352,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
343352 } else {
344353 dependencies = append (dependencies , annCtx )
345354 }
355+ splitDestinations , isDestinationSplit := splitAnnotationContextMap .Get (destHierarchy )
356+ if isDestinationSplit {
357+ destinations = append (destinations , splitDestinations ... )
358+ } else {
359+ destinations = append (destinations , destHierarchy )
360+ }
346361 dependencyTable = te
347362 }
348363 switch r := k .Right .(type ) {
@@ -368,6 +383,12 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
368383 } else {
369384 dependencies = append (dependencies , rhr )
370385 }
386+ splitDestinations , isDestinationSplit := splitAnnotationContextMap .Get (destHierarchy )
387+ if isDestinationSplit {
388+ destinations = append (destinations , splitDestinations ... )
389+ } else {
390+ destinations = append (destinations , destHierarchy )
391+ }
371392 dependencyTable = candidateTable
372393 }
373394 case * sqlparser.FuncExpr :
@@ -381,16 +402,25 @@ func (pr *standardParameterRouter) GetOnConditionDataFlows() (dataflow.Collectio
381402 } else {
382403 dependencies = append (dependencies , annCtx )
383404 }
405+ splitDestinations , isDestinationSplit := splitAnnotationContextMap .Get (destHierarchy )
406+ if isDestinationSplit {
407+ destinations = append (destinations , splitDestinations ... )
408+ } else {
409+ destinations = append (destinations , destHierarchy )
410+ }
384411 dependencyTable = te
385412 }
386413 if ! selfTableCited {
387414 return nil , fmt .Errorf ("table join ON comparison '%s' referencing incomplete" , sqlparser .String (k ))
388415 }
389- // rv[dependencies] = destHierarchy
390416
391- for _ , dependency := range dependencies {
417+ for i , dependency := range dependencies {
392418 srcVertex := rv .UpsertStandardDataFlowVertex (dependency , dependencyTable )
393- destVertex := rv .UpsertStandardDataFlowVertex (destHierarchy , destinationTable )
419+ destination := destHierarchy
420+ if i < len (destinations ) {
421+ destination = destinations [i ]
422+ }
423+ destVertex := rv .UpsertStandardDataFlowVertex (destination , destinationTable )
394424
395425 err := rv .AddOrUpdateEdge (
396426 srcVertex ,
0 commit comments