From notifications-return-6621-apmail-ignite-notifications-archive=ignite.apache.org@ignite.apache.org Mon Sep 9 11:59:13 2019 Return-Path: X-Original-To: apmail-ignite-notifications-archive@minotaur.apache.org Delivered-To: apmail-ignite-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 62AC619693 for ; Mon, 9 Sep 2019 11:59:13 +0000 (UTC) Received: (qmail 21472 invoked by uid 500); 9 Sep 2019 11:59:12 -0000 Delivered-To: apmail-ignite-notifications-archive@ignite.apache.org Received: (qmail 21419 invoked by uid 500); 9 Sep 2019 11:59:12 -0000 Mailing-List: contact notifications-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list notifications@ignite.apache.org Received: (qmail 21383 invoked by uid 99); 9 Sep 2019 11:59:12 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Sep 2019 11:59:12 +0000 From: GitBox To: notifications@ignite.apache.org Subject: [GitHub] [ignite] pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default query timeout Message-ID: <156803035278.31158.9626633231577500007.gitbox@gitbox.apache.org> Date: Mon, 09 Sep 2019 11:59:12 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default query timeout URL: https://github.com/apache/ignite/pull/6490#discussion_r322197696 ########## File path: modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java ########## @@ -134,6 +135,49 @@ public QueryParserResult parse(String schemaName, SqlFieldsQuery qry, boolean re return res; } + /** + * Create parameters from query. + * + * @param qry Query. + * @return Parameters. + */ + public QueryParameters fromQuery(SqlFieldsQuery qry) { + NestedTxMode nestedTxMode = NestedTxMode.DEFAULT; + boolean autoCommit = true; + List batchedArgs = null; + + if (qry instanceof SqlFieldsQueryEx) { + SqlFieldsQueryEx qry0 = (SqlFieldsQueryEx)qry; + + if (qry0.getNestedTxMode() != null) + nestedTxMode = qry0.getNestedTxMode(); + + autoCommit = qry0.isAutoCommit(); + + batchedArgs = qry0.batchedArguments(); + } + + int timeout = 0; Review comment: Initialization to 0 is not necessary here. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services