Skip to content

Commit

Permalink
Start debugging lpg insertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Hafner committed Dec 24, 2024
1 parent 2456fb0 commit b50cfcc
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
import org.polypheny.db.algebra.enumerable.EnumerableAlg;
import org.polypheny.db.algebra.enumerable.EnumerableAlgImplementor;
import org.polypheny.db.algebra.enumerable.EnumerableConvention;
import org.polypheny.db.algebra.enumerable.EnumerableRelIdentifier;
import org.polypheny.db.algebra.enumerable.PhysType;
import org.polypheny.db.algebra.enumerable.document.EnumerableDocIdentifier;
import org.polypheny.db.algebra.metadata.AlgMetadataQuery;
import org.polypheny.db.catalog.entity.Entity;
import org.polypheny.db.plan.AlgCluster;
Expand All @@ -50,9 +48,10 @@ public AlgOptCost computeSelfCost( AlgPlanner planner, AlgMetadataQuery mq ) {
return planner.getCostFactory().makeCost( dRows, 0, 0 );
}


@Override
public AlgNode copy( AlgTraitSet traitSet, List<AlgNode> inputs ) {
return new EnumerableLpgIdentifier( inputs.get(0).getCluster(), traitSet, entity, inputs.get( 0 ) );
return new EnumerableLpgIdentifier( inputs.get( 0 ).getCluster(), traitSet, entity, inputs.get( 0 ) );
}


Expand All @@ -64,8 +63,8 @@ public Result implement( EnumerableAlgImplementor implementor, Prefer pref ) {
final PhysType physType = result.physType();

Expression input_ = builder.append( "input", result.block() );
Expression entity_ = Expressions.constant(entity.getId());
Expression identification_ = builder.append( "identification", Expressions.call( BuiltInMethod.ADD_REL_IDENTIFIERS.method, input_, entity_ ) );
Expression entity_ = Expressions.constant( entity.getId() );
Expression identification_ = builder.append( "identification", Expressions.call( BuiltInMethod.ADD_LPG_IDENTIFIERS.method, input_, entity_ ) );

builder.add( Expressions.return_( null, identification_ ) );
return implementor.result( physType, builder.toBlock() );
Expand Down

0 comments on commit b50cfcc

Please sign in to comment.