Package org.teiid.query.sql.lang

Examples of org.teiid.query.sql.lang.ArrayTable


   
    @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);
    }
View Full Code Here


          processNode = ttn;
          break;
        }
        if (source instanceof ArrayTable) {
          ArrayTableNode atn = new ArrayTableNode(getID());
          ArrayTable at = (ArrayTable)source;
          updateGroupName(node, at);
          atn.setTable(at);
          processNode = atn;
          break;
        }
View Full Code Here

        } else if (clause instanceof XMLTable) {
          XMLTable xt = (XMLTable)clause;
          xt.rewriteDefaultColumn();
          rewriteExpressions(clause);
        } else if (clause instanceof ArrayTable) {
          ArrayTable at = (ArrayTable)clause;
          at.setArrayValue(rewriteExpressionDirect(at.getArrayValue()));
        }
        return clause;
  }
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.lang.ArrayTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.