class BeamSqlPositionExpression extends BeamSqlExpression {

  @Override
  public BeamSqlPrimitive evaluate(
      Row inputRow, BoundedWindow window, ImmutableMap<Integer, Object> correlateEnv) {
    String targetStr = opValueEvaluated(0, inputRow, window, correlateEnv);
    String containingStr = opValueEvaluated(1, inputRow, window, correlateEnv);
    int from = -1;
    if (operands.size() == 3) {
      Number tmp = opValueEvaluated(2, inputRow, window, correlateEnv);
      from = tmp.intValue();
    }

    int idx = containingStr.indexOf(targetStr, from);

    return BeamSqlPrimitive.of(SqlTypeName.INTEGER, idx);
  }

  public  BeamSqlPositionExpression(List<BeamSqlExpression> operands);

}