Search in sources :

Example 1 with OdpsLateralViewTableSource

use of com.alibaba.druid.sql.dialect.odps.ast.OdpsLateralViewTableSource in project druid by alibaba.

the class OdpsSelectParser method parseLateralView.

protected SQLTableSource parseLateralView(SQLTableSource tableSource) {
    accept(Token.VIEW);
    tableSource.setAlias(null);
    OdpsLateralViewTableSource lateralViewTabSrc = new OdpsLateralViewTableSource();
    lateralViewTabSrc.setTableSource(tableSource);
    SQLMethodInvokeExpr udtf = (SQLMethodInvokeExpr) this.exprParser.expr();
    lateralViewTabSrc.setMethod(udtf);
    String alias = as();
    lateralViewTabSrc.setAlias(alias);
    accept(Token.AS);
    this.exprParser.names(lateralViewTabSrc.getColumns());
    return parseTableSourceRest(lateralViewTabSrc);
}
Also used : OdpsLateralViewTableSource(com.alibaba.druid.sql.dialect.odps.ast.OdpsLateralViewTableSource) SQLMethodInvokeExpr(com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr)

Aggregations

SQLMethodInvokeExpr (com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr)1 OdpsLateralViewTableSource (com.alibaba.druid.sql.dialect.odps.ast.OdpsLateralViewTableSource)1