class BeamSqlArrayItemExpression extends BeamSqlExpression {

  @Override
  public BeamSqlPrimitive evaluate(
      Row inputRow, BoundedWindow window, BeamSqlExpressionEnvironment env) {
    List<Object> array = (List) opValueEvaluated(0, inputRow, window, env);
    Integer index = (Integer) opValueEvaluated(1, inputRow, window, env);

    // SQL array indexing is 1 based
    return BeamSqlPrimitive.of(outputType, array.get(index - 1));
  }

  public  BeamSqlArrayItemExpression(List<BeamSqlExpression> operands, SqlTypeName sqlTypeName);

}