/** * Parses an SQL statement. * * @return top-level SqlNode representing stmt * @throws SqlParseException if there is a parse error */ public SqlNode parseStmt() throws SqlParseException { try { return parser.parseSqlStmtEof(); } catch (Throwable ex) { if ((ex instanceof EigenbaseContextException) && (originalInput != null)) { ((EigenbaseContextException) ex).setOriginalStatement( originalInput); } throw parser.normalizeException(ex); } }
/** * Parses a <code>SELECT</code> statement. * * @return A {@link org.eigenbase.sql.SqlSelect} for a regular <code> * SELECT</code> statement; a {@link org.eigenbase.sql.SqlBinaryOperator} * for a <code>UNION</code>, <code>INTERSECT</code>, or <code>EXCEPT</code>. * @throws SqlParseException if there is a parse error */ public SqlNode parseQuery() throws SqlParseException { try { return parser.parseSqlStmtEof(); } catch (Throwable ex) { if ((ex instanceof EigenbaseContextException) && (originalInput != null)) { ((EigenbaseContextException) ex).setOriginalStatement( originalInput); } throw parser.normalizeException(ex); } }