@Test
public void testParameterSubcript() throws Exception {
SelectAnalysis analysis = analyze("select friends[?], counters[?], ['a','b','c'][?] from users",
new Object[]{"id",2,3});
assertThat(analysis.outputSymbols().get(0), isReference("friends.id", new ArrayType(DataTypes.LONG)));
assertThat(analysis.outputSymbols().get(1), isFunction(SubscriptFunction.NAME,
Arrays.<DataType>asList(new ArrayType(DataTypes.LONG), DataTypes.INTEGER)));
assertThat(analysis.outputSymbols().get(2), isLiteral("c", DataTypes.STRING));
}