Skip to content

Commit

Permalink
Make it possible to insert test data
Browse files Browse the repository at this point in the history
  • Loading branch information
murermader committed Dec 18, 2024
1 parent 34b2fb7 commit cc245ac
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,26 @@ protected List<RoutedAlgBuilder> handleGeneric( AlgNode node, List<RoutedAlgBuil
break;
case 2:
builders.forEach(
builder -> builder.replaceTop( node.copy( node.getTraitSet(), ImmutableList.of( builder.peek( 1 ), builder.peek( 0 ) ) ), 2 )
builder -> builder.replaceTop(
node.copy( node.getTraitSet(), ImmutableList.of( builder.peek( 1 ), builder.peek( 0 ) ) )
, 2 )
);
break;
default:
if ( node instanceof LogicalRelUnion l ) {
builders.forEach(
builder -> {
List<AlgNode> inputs = new ArrayList<>();
for ( int i = 0; i < node.getInputs().size(); i++ ) {
inputs.add( builder.peek( i ) );
}
builder.replaceTop(
node.copy( node.getTraitSet(), inputs )
, l.getInputs().size() );
}
);
break;
}
throw new GenericRuntimeException( "Unexpected number of input elements: " + node.getInputs().size() );
}
return builders;
Expand Down

0 comments on commit cc245ac

Please sign in to comment.