public static RelDataType getSourceRelSchema(RelSchemaProvider relSchemaProvider,
      RelSchemaConverter relSchemaConverter) {
    // If the source part is the last one, then fetch the schema corresponding to the stream and register.
    return relSchemaConverter.convertToRelSchema(getSourceSqlSchema(relSchemaProvider));
  }
QueryPlanner that uses calcite engine to convert the sql query to relational graph.
samza-sql/src/main/java/org/apache/samza/sql/planner/QueryPlanner.java