Search in sources :

Example 1 with GridSqlQuery

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery in project ignite by apache.

the class IgniteH2Indexing method parseAndSplit.

/**
 * Parse and split query if needed, cache either two-step query or statement.
 * @param schemaName Schema name.
 * @param qry Query.
 * @param firstArg Position of the first argument of the following {@code Prepared}.
 * @return Result: prepared statement, H2 command, two-step query (if needed),
 *     metadata for two-step query (if needed), evaluated query local execution flag.
 */
private ParsingResult parseAndSplit(String schemaName, SqlFieldsQuery qry, int firstArg) {
    Connection c = connectionForSchema(schemaName);
    // For queries that are explicitly local, we rely on the flag specified in the query
    // because this parsing result will be cached and used for queries directly.
    // For other queries, we enforce join order at this stage to avoid premature optimizations
    // (and therefore longer parsing) as long as there'll be more parsing at split stage.
    boolean enforceJoinOrderOnParsing = (!qry.isLocal() || qry.isEnforceJoinOrder());
    H2Utils.setupConnection(c, /*distributedJoins*/
    false, /*enforceJoinOrder*/
    enforceJoinOrderOnParsing);
    boolean loc = qry.isLocal();
    PreparedStatement stmt = prepareStatementAndCaches(c, qry.getSql());
    if (loc && GridSqlQueryParser.checkMultipleStatements(stmt))
        throw new IgniteSQLException("Multiple statements queries are not supported for local queries");
    GridSqlQueryParser.PreparedWithRemaining prep = GridSqlQueryParser.preparedWithRemaining(stmt);
    Prepared prepared = prep.prepared();
    checkQueryType(qry, prepared.isQuery());
    String remainingSql = prep.remainingSql();
    int paramsCnt = prepared.getParameters().size();
    Object[] argsOrig = qry.getArgs();
    Object[] args = null;
    if (!DmlUtils.isBatched(qry) && paramsCnt > 0) {
        if (argsOrig == null || argsOrig.length < firstArg + paramsCnt) {
            throw new IgniteException("Invalid number of query parameters. " + "Cannot find " + (argsOrig != null ? argsOrig.length + 1 - firstArg : 1) + " parameter.");
        }
        args = Arrays.copyOfRange(argsOrig, firstArg, firstArg + paramsCnt);
    }
    if (prepared.isQuery()) {
        try {
            bindParameters(stmt, F.asList(args));
        } catch (IgniteCheckedException e) {
            U.closeQuiet(stmt);
            throw new IgniteSQLException("Failed to bind parameters: [qry=" + prepared.getSQL() + ", params=" + Arrays.deepToString(args) + "]", IgniteQueryErrorCode.PARSING, e);
        }
        GridSqlQueryParser parser = null;
        if (!loc) {
            parser = new GridSqlQueryParser(false);
            GridSqlStatement parsedStmt = parser.parse(prepared);
            // Legit assertion - we have H2 query flag above.
            assert parsedStmt instanceof GridSqlQuery;
            loc = parser.isLocalQuery(qry.isReplicatedOnly());
        }
        if (loc) {
            if (parser == null) {
                parser = new GridSqlQueryParser(false);
                parser.parse(prepared);
            }
            GridCacheContext cctx = parser.getFirstPartitionedCache();
            if (cctx != null && cctx.config().getQueryParallelism() > 1) {
                loc = false;
                qry.setDistributedJoins(true);
            }
        }
    }
    SqlFieldsQuery newQry = cloneFieldsQuery(qry).setSql(prepared.getSQL()).setArgs(args);
    boolean hasTwoStep = !loc && prepared.isQuery();
    // Let's not cache multiple statements and distributed queries as whole two step query will be cached later on.
    if (remainingSql != null || hasTwoStep)
        getStatementsCacheForCurrentThread().remove(schemaName, qry.getSql());
    if (!hasTwoStep)
        return new ParsingResult(prepared, newQry, remainingSql, null, null, null);
    final UUID locNodeId = ctx.localNodeId();
    // Now we're sure to have a distributed query. Let's try to get a two-step plan from the cache, or perform the
    // split if needed.
    H2TwoStepCachedQueryKey cachedQryKey = new H2TwoStepCachedQueryKey(schemaName, qry.getSql(), qry.isCollocated(), qry.isDistributedJoins(), qry.isEnforceJoinOrder(), qry.isLocal());
    H2TwoStepCachedQuery cachedQry;
    if ((cachedQry = twoStepCache.get(cachedQryKey)) != null) {
        checkQueryType(qry, true);
        GridCacheTwoStepQuery twoStepQry = cachedQry.query().copy();
        List<GridQueryFieldMetadata> meta = cachedQry.meta();
        return new ParsingResult(prepared, newQry, remainingSql, twoStepQry, cachedQryKey, meta);
    }
    try {
        GridH2QueryContext.set(new GridH2QueryContext(locNodeId, locNodeId, 0, PREPARE).distributedJoinMode(distributedJoinMode(qry.isLocal(), qry.isDistributedJoins())));
        try {
            return new ParsingResult(prepared, newQry, remainingSql, split(prepared, newQry), cachedQryKey, H2Utils.meta(stmt.getMetaData()));
        } catch (IgniteCheckedException e) {
            throw new IgniteSQLException("Failed to bind parameters: [qry=" + newQry.getSql() + ", params=" + Arrays.deepToString(newQry.getArgs()) + "]", IgniteQueryErrorCode.PARSING, e);
        } catch (SQLException e) {
            throw new IgniteSQLException(e);
        } finally {
            U.close(stmt, log);
        }
    } finally {
        GridH2QueryContext.clearThreadLocal();
    }
}
Also used : SQLException(java.sql.SQLException) IgniteSQLException(org.apache.ignite.internal.processors.query.IgniteSQLException) GridSqlStatement(org.apache.ignite.internal.processors.query.h2.sql.GridSqlStatement) Prepared(org.h2.command.Prepared) GridCacheTwoStepQuery(org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery) GridQueryFieldMetadata(org.apache.ignite.internal.processors.query.GridQueryFieldMetadata) IgniteSystemProperties.getString(org.apache.ignite.IgniteSystemProperties.getString) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) UUID(java.util.UUID) GridH2QueryContext(org.apache.ignite.internal.processors.query.h2.opt.GridH2QueryContext) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) Connection(java.sql.Connection) PreparedStatement(java.sql.PreparedStatement) SqlFieldsQuery(org.apache.ignite.cache.query.SqlFieldsQuery) GridSqlQuery(org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery) GridSqlQueryParser(org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser) IgniteSQLException(org.apache.ignite.internal.processors.query.IgniteSQLException)

Example 2 with GridSqlQuery

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery in project ignite by apache.

the class QueryParser method parseH2.

/**
 * Parse and split query if needed, cache either two-step query or statement.
 *
 * @param schemaName Schema name.
 * @param qry Query.
 * @param batched Batched flag.
 * @param remainingAllowed Whether multiple statements are allowed.
 * @return Parsing result.
 */
@SuppressWarnings("IfMayBeConditional")
private QueryParserResult parseH2(String schemaName, SqlFieldsQuery qry, boolean batched, boolean remainingAllowed) {
    try (H2PooledConnection c = connMgr.connection(schemaName)) {
        // For queries that are explicitly local, we rely on the flag specified in the query
        // because this parsing result will be cached and used for queries directly.
        // For other queries, we enforce join order at this stage to avoid premature optimizations
        // (and therefore longer parsing) as long as there'll be more parsing at split stage.
        boolean enforceJoinOrderOnParsing = (!qry.isLocal() || qry.isEnforceJoinOrder());
        QueryContext qctx = QueryContext.parseContext(idx.backupFilter(null, null), qry.isLocal());
        H2Utils.setupConnection(c, qctx, false, enforceJoinOrderOnParsing, false);
        PreparedStatement stmt = null;
        try {
            stmt = c.prepareStatementNoCache(qry.getSql());
            if (qry.isLocal() && GridSqlQueryParser.checkMultipleStatements(stmt))
                throw new IgniteSQLException("Multiple statements queries are not supported for local queries.", IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
            GridSqlQueryParser.PreparedWithRemaining prep = GridSqlQueryParser.preparedWithRemaining(stmt);
            Prepared prepared = prep.prepared();
            if (GridSqlQueryParser.isExplainUpdate(prepared))
                throw new IgniteSQLException("Explains of update queries are not supported.", IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
            // Get remaining query and check if it is allowed.
            SqlFieldsQuery remainingQry = null;
            if (!F.isEmpty(prep.remainingSql())) {
                checkRemainingAllowed(remainingAllowed);
                remainingQry = cloneFieldsQuery(qry).setSql(prep.remainingSql());
            }
            // Prepare new query.
            SqlFieldsQuery newQry = cloneFieldsQuery(qry).setSql(prepared.getSQL());
            final int paramsCnt = prepared.getParameters().size();
            Object[] argsOrig = qry.getArgs();
            Object[] args = null;
            Object[] remainingArgs = null;
            if (!batched && paramsCnt > 0) {
                if (argsOrig == null || argsOrig.length < paramsCnt)
                    // Not enough parameters, but we will handle this later on execution phase.
                    args = argsOrig;
                else {
                    args = Arrays.copyOfRange(argsOrig, 0, paramsCnt);
                    if (paramsCnt != argsOrig.length)
                        remainingArgs = Arrays.copyOfRange(argsOrig, paramsCnt, argsOrig.length);
                }
            } else
                remainingArgs = argsOrig;
            newQry.setArgs(args);
            QueryDescriptor newQryDesc = queryDescriptor(schemaName, newQry);
            if (remainingQry != null)
                remainingQry.setArgs(remainingArgs);
            final List<JdbcParameterMeta> paramsMeta;
            try {
                paramsMeta = H2Utils.parametersMeta(stmt.getParameterMetaData());
                assert prepared.getParameters().size() == paramsMeta.size();
            } catch (IgniteCheckedException | SQLException e) {
                throw new IgniteSQLException("Failed to get parameters metadata", IgniteQueryErrorCode.UNKNOWN, e);
            }
            // Do actual parsing.
            if (CommandProcessor.isCommand(prepared)) {
                GridSqlStatement cmdH2 = new GridSqlQueryParser(false, log).parse(prepared);
                QueryParserResultCommand cmd = new QueryParserResultCommand(null, cmdH2, false);
                return new QueryParserResult(newQryDesc, queryParameters(newQry), remainingQry, paramsMeta, null, null, cmd);
            } else if (CommandProcessor.isCommandNoOp(prepared)) {
                QueryParserResultCommand cmd = new QueryParserResultCommand(null, null, true);
                return new QueryParserResult(newQryDesc, queryParameters(newQry), remainingQry, paramsMeta, null, null, cmd);
            } else if (GridSqlQueryParser.isDml(prepared)) {
                QueryParserResultDml dml = prepareDmlStatement(newQryDesc, prepared);
                return new QueryParserResult(newQryDesc, queryParameters(newQry), remainingQry, paramsMeta, null, dml, null);
            } else if (!prepared.isQuery()) {
                throw new IgniteSQLException("Unsupported statement: " + newQry.getSql(), IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
            }
            // Parse SELECT.
            GridSqlQueryParser parser = new GridSqlQueryParser(false, log);
            GridSqlQuery selectStmt = (GridSqlQuery) parser.parse(prepared);
            List<Integer> cacheIds = parser.cacheIds();
            Integer mvccCacheId = mvccCacheIdForSelect(parser.objectsMap());
            // Calculate if query is in fact can be executed locally.
            boolean loc = qry.isLocal();
            if (!loc) {
                if (parser.isLocalQuery())
                    loc = true;
            }
            // If this is a local query, check if it must be split.
            boolean locSplit = false;
            if (loc) {
                GridCacheContext cctx = parser.getFirstPartitionedCache();
                if (cctx != null && cctx.config().getQueryParallelism() > 1)
                    locSplit = true;
            }
            // Split is required either if query is distributed, or when it is local, but executed
            // over segmented PARTITIONED case. In this case multiple map queries will be executed against local
            // node stripes in parallel and then merged through reduce process.
            boolean splitNeeded = !loc || locSplit;
            String forUpdateQryOutTx = null;
            String forUpdateQryTx = null;
            GridCacheTwoStepQuery forUpdateTwoStepQry = null;
            boolean forUpdate = GridSqlQueryParser.isForUpdateQuery(prepared);
            // column to be able to lock selected rows further.
            if (forUpdate) {
                // We have checked above that it's not an UNION query, so it's got to be SELECT.
                assert selectStmt instanceof GridSqlSelect;
                // Check FOR UPDATE invariants: only one table, MVCC is there.
                if (cacheIds.size() != 1)
                    throw new IgniteSQLException("SELECT FOR UPDATE is supported only for queries " + "that involve single transactional cache.");
                if (mvccCacheId == null)
                    throw new IgniteSQLException("SELECT FOR UPDATE query requires transactional cache " + "with MVCC enabled.", IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
                // We need a copy because we are going to modify AST a bit. We do not want to modify original select.
                GridSqlSelect selForUpdate = ((GridSqlSelect) selectStmt).copySelectForUpdate();
                // Clear forUpdate flag to run it as a plain query.
                selForUpdate.forUpdate(false);
                ((GridSqlSelect) selectStmt).forUpdate(false);
                // Remember sql string without FOR UPDATE clause.
                forUpdateQryOutTx = selForUpdate.getSQL();
                GridSqlAlias keyCol = keyColumn(selForUpdate);
                selForUpdate.addColumn(keyCol, true);
                // Remember sql string without FOR UPDATE clause and with _key column.
                forUpdateQryTx = selForUpdate.getSQL();
                // Prepare additional two-step query for FOR UPDATE case.
                if (splitNeeded) {
                    c.schema(newQry.getSchema());
                    forUpdateTwoStepQry = GridSqlQuerySplitter.split(c, selForUpdate, forUpdateQryTx, newQry.isCollocated(), newQry.isDistributedJoins(), newQry.isEnforceJoinOrder(), locSplit, idx, paramsCnt, log);
                }
            }
            GridCacheTwoStepQuery twoStepQry = null;
            if (splitNeeded) {
                GridSubqueryJoinOptimizer.pullOutSubQueries(selectStmt);
                c.schema(newQry.getSchema());
                twoStepQry = GridSqlQuerySplitter.split(c, selectStmt, newQry.getSql(), newQry.isCollocated(), newQry.isDistributedJoins(), newQry.isEnforceJoinOrder(), locSplit, idx, paramsCnt, log);
            }
            List<GridQueryFieldMetadata> meta = H2Utils.meta(stmt.getMetaData());
            QueryParserResultSelect select = new QueryParserResultSelect(selectStmt, twoStepQry, forUpdateTwoStepQry, meta, cacheIds, mvccCacheId, forUpdateQryOutTx, forUpdateQryTx);
            return new QueryParserResult(newQryDesc, queryParameters(newQry), remainingQry, paramsMeta, select, null, null);
        } catch (IgniteCheckedException | SQLException e) {
            throw new IgniteSQLException("Failed to parse query. " + e.getMessage(), IgniteQueryErrorCode.PARSING, e);
        } finally {
            U.close(stmt, log);
        }
    }
}
Also used : GridSqlAlias(org.apache.ignite.internal.processors.query.h2.sql.GridSqlAlias) SQLException(java.sql.SQLException) IgniteSQLException(org.apache.ignite.internal.processors.query.IgniteSQLException) GridSqlStatement(org.apache.ignite.internal.processors.query.h2.sql.GridSqlStatement) Prepared(org.h2.command.Prepared) GridCacheTwoStepQuery(org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery) GridQueryFieldMetadata(org.apache.ignite.internal.processors.query.GridQueryFieldMetadata) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) JdbcParameterMeta(org.apache.ignite.internal.processors.odbc.jdbc.JdbcParameterMeta) PreparedStatement(java.sql.PreparedStatement) QueryContext(org.apache.ignite.internal.processors.query.h2.opt.QueryContext) GridSqlSelect(org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect) SqlFieldsQuery(org.apache.ignite.cache.query.SqlFieldsQuery) GridSqlQuery(org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery) GridSqlQueryParser(org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser) IgniteSQLException(org.apache.ignite.internal.processors.query.IgniteSQLException)

Example 3 with GridSqlQuery

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery in project ignite by apache.

the class DmlAstUtils method selectForInsertOrMerge.

/**
 * Create SELECT on which subsequent INSERT or MERGE will be based.
 *
 * @param cols Columns to insert values into.
 * @param rows Rows to create pseudo-SELECT upon.
 * @param subQry Subquery to use rather than rows.
 * @return Subquery or pseudo-SELECT to evaluate inserted expressions, or {@code null} no query needs to be run.
 */
public static GridSqlQuery selectForInsertOrMerge(GridSqlColumn[] cols, List<GridSqlElement[]> rows, GridSqlQuery subQry) {
    if (!F.isEmpty(rows)) {
        assert !F.isEmpty(cols);
        GridSqlSelect sel = new GridSqlSelect();
        GridSqlFunction from = new GridSqlFunction(GridSqlFunctionType.TABLE);
        sel.from(from);
        GridSqlArray[] args = new GridSqlArray[cols.length];
        for (int i = 0; i < cols.length; i++) {
            GridSqlArray arr = new GridSqlArray(rows.size());
            String colName = cols[i].columnName();
            GridSqlAlias alias = new GridSqlAlias(colName, arr);
            alias.resultType(cols[i].resultType());
            from.addChild(alias);
            args[i] = arr;
            GridSqlColumn newCol = new GridSqlColumn(null, from, null, "TABLE", colName);
            newCol.resultType(cols[i].resultType());
            sel.addColumn(newCol, true);
        }
        for (GridSqlElement[] row : rows) {
            assert cols.length == row.length;
            for (int i = 0; i < row.length; i++) args[i].addChild(row[i]);
        }
        return sel;
    } else {
        assert subQry != null;
        return subQry;
    }
}
Also used : GridSqlAlias(org.apache.ignite.internal.processors.query.h2.sql.GridSqlAlias) GridSqlColumn(org.apache.ignite.internal.processors.query.h2.sql.GridSqlColumn) GridSqlElement(org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement) GridSqlFunction(org.apache.ignite.internal.processors.query.h2.sql.GridSqlFunction) ValueString(org.h2.value.ValueString) GridSqlArray(org.apache.ignite.internal.processors.query.h2.sql.GridSqlArray) GridSqlSelect(org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect)

Example 4 with GridSqlQuery

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery in project ignite by apache.

the class GridSubqueryJoinOptimizer method pullOutSubQryFromSelectExpr.

/**
 * Pull out sub-select from SELECT clause to the parent select level.
 * <p>
 * Example:
 * <pre>
 *   Before:
 *     SELECT name,
 *            (SELECT name FROM dep d WHERE d.id = e.dep_id) as dep_name
 *       FROM emp e
 *      WHERE sal > 2000
 *
 *   After:
 *     SELECT name,
 *            d.name as dep_name
 *       FROM emp e
 *       LEFT JOIN dep d
 *         ON d.id = e.dep_id
 *      WHERE sal > 2000
 * </pre>
 *
 * @param parent Parent select.
 * @param targetEl Target sql element. Can be {@code null}.
 * @param childInd Column ind.
 */
private static boolean pullOutSubQryFromSelectExpr(GridSqlSelect parent, @Nullable GridSqlAst targetEl, int childInd) {
    GridSqlSubquery subQry = targetEl != null ? targetEl.child(childInd) : (GridSqlSubquery) parent.columns(false).get(childInd);
    if (!subQueryCanBePulledOut(subQry))
        return false;
    GridSqlSelect subS = subQry.subquery();
    if (subS.allColumns() != 1)
        return false;
    GridSqlAst subCol = GridSqlAlias.unwrap(subS.columns(false).get(0));
    if (subCol instanceof GridSqlConst)
        return false;
    if (targetEl != null)
        targetEl.child(childInd, subCol);
    else
        parent.setColumn(childInd, subCol);
    GridSqlElement parentFrom = parent.from() instanceof GridSqlElement ? (GridSqlElement) parent.from() : new GridSqlSubquery((GridSqlQuery) parent.from());
    parent.from(new GridSqlJoin(parentFrom, GridSqlAlias.unwrap(subS.from()), true, (GridSqlElement) subS.where())).child();
    return true;
}
Also used : GridSqlQuery(org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery) GridSqlConst(org.apache.ignite.internal.processors.query.h2.sql.GridSqlConst) GridSqlSubquery(org.apache.ignite.internal.processors.query.h2.sql.GridSqlSubquery) GridSqlAst(org.apache.ignite.internal.processors.query.h2.sql.GridSqlAst) GridSqlJoin(org.apache.ignite.internal.processors.query.h2.sql.GridSqlJoin) GridSqlElement(org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement) GridSqlSelect(org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect)

Example 5 with GridSqlQuery

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery in project ignite by apache.

the class GridSubqueryJoinOptimizer method pullOutSubQryFromExistsClause.

/**
 * Pull out sub-select from EXISTS clause to the parent select level.
 * <p>
 * Example:
 * <pre>
 *   Before:
 *     SELECT name
 *       FROM emp e
 *      WHERE EXISTS (SELECT 1 FROM dep d WHERE d.id = e.dep_id and d.name = 'dep1')
 *        AND sal > 2000
 *
 *   After:
 *     SELECT name
 *       FROM emp e
 *       JOIN dep d
 *      WHERE sal > 2000 AND d.id = e.dep_id and d.name = 'dep1
 * </pre>
 *
 * @param parent Parent select.
 * @param targetEl Target sql element. Can be null.
 * @param childInd Column ind.
 */
private static boolean pullOutSubQryFromExistsClause(GridSqlSelect parent, @Nullable GridSqlAst targetEl, int childInd) {
    // extract sub-query
    GridSqlSubquery subQry = targetEl != null ? targetEl.child(childInd).child() : parent.where().child();
    if (!subQueryCanBePulledOut(subQry))
        return false;
    GridSqlSelect subS = subQry.subquery();
    if (targetEl != null)
        targetEl.child(childInd, subS.where());
    else
        parent.where(subS.where());
    GridSqlElement parentFrom = parent.from() instanceof GridSqlElement ? (GridSqlElement) parent.from() : new GridSqlSubquery((GridSqlQuery) parent.from());
    parent.from(new GridSqlJoin(parentFrom, GridSqlAlias.unwrap(subS.from()), false, null)).child();
    return true;
}
Also used : GridSqlQuery(org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery) GridSqlSubquery(org.apache.ignite.internal.processors.query.h2.sql.GridSqlSubquery) GridSqlJoin(org.apache.ignite.internal.processors.query.h2.sql.GridSqlJoin) GridSqlElement(org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement) GridSqlSelect(org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect)

Aggregations

GridSqlSelect (org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect)12 GridSqlQuery (org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuery)9 GridSqlElement (org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement)7 IgniteSQLException (org.apache.ignite.internal.processors.query.IgniteSQLException)6 GridSqlUnion (org.apache.ignite.internal.processors.query.h2.sql.GridSqlUnion)6 GridSqlColumn (org.apache.ignite.internal.processors.query.h2.sql.GridSqlColumn)5 GridSqlTable (org.apache.ignite.internal.processors.query.h2.sql.GridSqlTable)4 PreparedStatement (java.sql.PreparedStatement)3 SQLException (java.sql.SQLException)3 ArrayList (java.util.ArrayList)3 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)3 GridCacheTwoStepQuery (org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery)3 GridQueryProperty (org.apache.ignite.internal.processors.query.GridQueryProperty)3 GridH2RowDescriptor (org.apache.ignite.internal.processors.query.h2.opt.GridH2RowDescriptor)3 GridSqlAst (org.apache.ignite.internal.processors.query.h2.sql.GridSqlAst)3 GridSqlInsert (org.apache.ignite.internal.processors.query.h2.sql.GridSqlInsert)3 GridSqlMerge (org.apache.ignite.internal.processors.query.h2.sql.GridSqlMerge)3 GridSqlQueryParser (org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser)3 Prepared (org.h2.command.Prepared)3 List (java.util.List)2