Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A5A77200CF3 for ; Wed, 13 Sep 2017 10:24:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A43691609CA; Wed, 13 Sep 2017 08:24:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EA51E1609C9 for ; Wed, 13 Sep 2017 10:24:05 +0200 (CEST) Received: (qmail 41930 invoked by uid 500); 13 Sep 2017 08:24:05 -0000 Mailing-List: contact issues-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 issues@ignite.apache.org Received: (qmail 41921 invoked by uid 99); 13 Sep 2017 08:24:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Sep 2017 08:24:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 792F5C975C for ; Wed, 13 Sep 2017 08:24:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id XR-g6ha0ksik for ; Wed, 13 Sep 2017 08:24:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2ED1E60D44 for ; Wed, 13 Sep 2017 08:24:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EEC7AE0F03 for ; Wed, 13 Sep 2017 08:24:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 55EAD2538A for ; Wed, 13 Sep 2017 08:24:00 +0000 (UTC) Date: Wed, 13 Sep 2017 08:24:00 +0000 (UTC) From: "Vladimir Ozerov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-6190) SQL query fails silently if Set is passed as a parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 13 Sep 2017 08:24:06 -0000 [ https://issues.apache.org/jira/browse/IGNITE-6190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Ozerov updated IGNITE-6190: ------------------------------------ Component/s: sql > SQL query fails silently if Set is passed as a parameter > -------------------------------------------------------- > > Key: IGNITE-6190 > URL: https://issues.apache.org/jira/browse/IGNITE-6190 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Denis Magda > Assignee: Roman Shtykh > Attachments: TestIgniteQuery.zip > > > Seems like the SqlQuery API does not like {{Set}} as the input parameter. While this query doesn't work (the Set is used as an input): > {code} > public Map getAccountsForLe(Set leId) { > SqlQuery query = > new SqlQuery(Account.class, "from Account join table(id varchar = ?) i on Account.clientLegalEntityId = i.id") > .setArgs(leId); > Map results = new HashMap<>(); > _cache.query(query).getAll().stream().forEach(e -> results.put(e.getKey(), e.getValue())); > return results; > } > {code} > This one works well (the Set is converted to Array explicitly): > {code} > public Map getAccountsForLe(Set leId) { > SqlQuery query = > new SqlQuery(Account.class, "from Account join table(id varchar = ?) i on Account.clientLegalEntityId = i.id") > .setArgs(leId.toArray()); > Map results = new HashMap<>(); > _cache.query(query).getAll().stream().forEach(e -> results.put(e.getKey(), e.getValue())); > return results; > } > {code} > The fact that it fails silently is an issue. IMHO there should be some validation to alert the calling code that the type specified is not valid or the set has to be transformed to the array on the fly. -- This message was sent by Atlassian JIRA (v6.4.14#64029)