You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/26 05:49:00 UTC
[jira] [Commented] (METAMODEL-1116) MetaModel wrongly parse query
with IN clause
[ https://issues.apache.org/jira/browse/METAMODEL-1116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592810#comment-16592810 ]
ASF GitHub Bot commented on METAMODEL-1116:
-------------------------------------------
GitHub user kaspersorensen opened a pull request:
https://github.com/apache/metamodel/pull/186
METAMODEL-1116: Upgraded parent-pom to enable sha-512 signing.
I believe this fixes METAMODEL-1116 since the new apache parent-pom contains this plugin configuration:
```
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<version>1.7</version>
... <configuration>
<algorithms>
<algorithm>SHA-512</algorithm>
</algorithms>
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kaspersorensen/metamodel METAMODEL-1116-release-sha512
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metamodel/pull/186.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #186
----
commit 92e1286f5ad69e5c5c8204b68fc934a912405b67
Author: Kasper Sørensen <i....@...>
Date: 2018-08-26T05:46:50Z
METAMODEL-1116: Upgraded parent-pom to enable sha-512 signing.
----
> MetaModel wrongly parse query with IN clause
> --------------------------------------------
>
> Key: METAMODEL-1116
> URL: https://issues.apache.org/jira/browse/METAMODEL-1116
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 4.3.2, 4.5.4
> Reporter: Alessandro Portosa
> Priority: Blocker
> Labels: IN, query
>
> ------------------------------------------------------
> here dataContext is a PojoDataContext
> ------------------------------------------------------
> Query query = dataContext.parseQuery(newSqlQuery);
> -----------------------------
> newSqlQuery
> -----------------------------
> select *
> from SpagoBI.cd569eca_66d8_4106_b80c_d4d91fec3b5f
> where (1,store_type,region_id) IN ((1,'Deluxe Supermarket','26'))
> -----------------------------
> query
> -----------------------------
> SELECT cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_id, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_type, cd569eca_66d8_4106_b80c_d4d91fec3b5f.region_id, cd569eca_66d8_4106_b80c_d4d91fec3b5f.sales_region_id, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_name, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_number, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_street_address, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_city, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_state, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_postal_code, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_country, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_manager, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_phone, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_fax, cd569eca_66d8_4106_b80c_d4d91fec3b5f.first_opened_date, cd569eca_66d8_4106_b80c_d4d91fec3b5f.last_remodel_date, cd569eca_66d8_4106_b80c_d4d91fec3b5f.store_sqft, cd569eca_66d8_4106_b80c_d4d91fec3b5f.grocery_sqft, cd569eca_66d8_4106_b80c_d4d91fec3b5f.frozen_sqft, cd569eca_66d8_4106_b80c_d4d91fec3b5f.meat_sqft, cd569eca_66d8_4106_b80c_d4d91fec3b5f.coffee_bar, cd569eca_66d8_4106_b80c_d4d91fec3b5f.video_store, cd569eca_66d8_4106_b80c_d4d91fec3b5f.salad_bar, cd569eca_66d8_4106_b80c_d4d91fec3b5f.prepared_food, cd569eca_66d8_4106_b80c_d4d91fec3b5f.florist
> FROM SpagoBI.cd569eca_66d8_4106_b80c_d4d91fec3b5f
> WHERE 1,store_type,region_id) IN ((1,'Deluxe Supermarket','26')
> As you can see, MetaModel has removed the external bracket in the WHERE clause...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)