@Test public void testArrayTable() throws Exception {
String sql = "SELECT * from arraytable(null columns x string, y date) as x"; //$NON-NLS-1$
Query query = new Query();
query.setSelect(new Select(Arrays.asList(new AllSymbol())));
ArrayTable tt = new ArrayTable();
tt.setArrayValue(new Constant(null, DataTypeManager.DefaultDataClasses.OBJECT));
List<TableFunctionReference.ProjectedColumn> columns = new ArrayList<TableFunctionReference.ProjectedColumn>();
columns.add(new TableFunctionReference.ProjectedColumn("x", "string"));
columns.add(new TableFunctionReference.ProjectedColumn("y", "date"));
tt.setColumns(columns);
tt.setName("x");
query.setFrom(new From(Arrays.asList(tt)));
helpTest(sql, "SELECT * FROM ARRAYTABLE(null COLUMNS x string, y date) AS x", query);
}