coral-beam/src/main/java/com/linkedin/beam/planner/CodeGenerator.java
private void collectRelOpSchemas(RelNode relNode, Map<String, RelDataType> schemaMaps) {
    for (RelNode relNode1 : relNode.getInputs()) {
      collectRelOpSchemas(relNode1, schemaMaps);
    }
    if (relNode instanceof Project
        || relNode instanceof BeamArrayFlatten
        || relNode instanceof Join
        || relNode instanceof Aggregate && !((Aggregate) relNode).getAggCallList().isEmpty()) {
      schemaMaps.put(RexBeamUtils.getSchemaName(((BeamNode) relNode).getVariableName()), relNode.getRowType());
      if (relNode instanceof Join) {
        final BeamJoin join = (BeamJoin) relNode;
        schemaMaps.put(RexBeamUtils.getSchemaName(((BeamNode) join.getLeft()).getVariableName()),
            join.getLeft().getRowType());
        schemaMaps.put(RexBeamUtils.getSchemaName(((BeamNode) join.getRight()).getVariableName()),
            join.getRight().getRowType());
      }
    }
  }
/**
   * Collects all required schemas that are used in the code.
   *
   * @param relNode Root node
   * @param schemaMaps Map to store required schemas
   */
Collects all required schemas that are used in the code.
@param relNode Root node
@param schemaMaps Map to store required schemas
Collects all required schemas that are used in the code . @param relNode Root node @param schemaMaps Map to store required schemas
private void collectRelOpSchemas(RelNode relNode, Map<String, RelDataType> schemaMaps) {
    for (RelNode relNode1 : relNode.getInputs()) {
      collectRelOpSchemas(relNode1, schemaMaps);
    }
    if (relNode instanceof Project
        || relNode instanceof BeamArrayFlatten
        || relNode instanceof Join
        || relNode instanceof Aggregate && !((Aggregate) relNode).getAggCallList().isEmpty()) {
      schemaMaps.put(RexBeamUtils.getSchemaName(((BeamNode) relNode).getVariableName()), relNode.getRowType());
      if (relNode instanceof Join) {
        final BeamJoin join = (BeamJoin) relNode;
        schemaMaps.put(RexBeamUtils.getSchemaName(((BeamNode) join.getLeft()).getVariableName()),
            join.getLeft().getRowType());
        schemaMaps.put(RexBeamUtils.getSchemaName(((BeamNode) join.getRight()).getVariableName()),
            join.getRight().getRowType());
      }
    }
  }
private void collectRelOpSchemas ( RelNode relNode , Map < String , RelDataType > schemaMaps ) { for ( RelNode relNode1 : relNode . getInputs ( ) ) { collectRelOpSchemas ( relNode1 , schemaMaps ) ; } if ( relNode instanceof Project || relNode instanceof BeamArrayFlatten || relNode instanceof Join || relNode instanceof Aggregate && ! ( ( Aggregate ) relNode ) . getAggCallList ( ) . isEmpty ( ) ) { schemaMaps . put ( RexBeamUtils . getSchemaName ( ( ( BeamNode ) relNode ) . getVariableName ( ) ) , relNode . getRowType ( ) ) ; if ( relNode instanceof Join ) { final BeamJoin join = ( BeamJoin ) relNode ; schemaMaps . put ( RexBeamUtils . getSchemaName ( ( ( BeamNode ) join . getLeft ( ) ) . getVariableName ( ) ) , join . getLeft ( ) . getRowType ( ) ) ; schemaMaps . put ( RexBeamUtils . getSchemaName ( ( ( BeamNode ) join . getRight ( ) ) . getVariableName ( ) ) , join . getRight ( ) . getRowType ( ) ) ; } } }
Collects all required schemas that are used in the code.
Collects all required schemas that are used in the code .