You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2017/12/10 06:41:01 UTC
[jira] [Updated] (METAMODEL-1172) Allow searching list of type map
in where clause
[ https://issues.apache.org/jira/browse/METAMODEL-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kasper Sørensen updated METAMODEL-1172:
---------------------------------------
Description:
I have schema like “_id”,"address","borough","cuisine","grades".
Where grades is list of maps with elements like
{code}
[Document{{date=Fri May 14 05:30:00 IST 2021, grade=A, score=12.0}}, Document{{date=Wed Aug 13 05:30:00 IST 2025, grade=A, score=12.0}}, Document{{date=Sun Apr 04 05:30:00 IST 2027, grade=A, score=12.0}}]
{code}
Now if I execute query like
{code}
DataSet ds = mongo.executeQuery("select * from restaurants where grades[0].grade='A'");
{code}
Its failing at line 427 of MongoDbContext class final Column column = item.getSelectItem().getColumn();
was:
I have schema like “_id”,"address","borough","cuisine","grades"
Where grades is list of maps with elements like
[Document{{date=Fri May 14 05:30:00 IST 2021, grade=A, score=12.0}}, Document{{date=Wed Aug 13 05:30:00 IST 2025, grade=A, score=12.0}}, Document{{date=Sun Apr 04 05:30:00 IST 2027, grade=A, score=12.0}}]
Now if I execute query like
{code}
DataSet ds = mongo.executeQuery("select * from restaurants where grades[0].grade='A'");
{code}
Its failing at line 427 of MongoDbContext class final Column column = item.getSelectItem().getColumn();
> Allow searching list of type map in where clause
> ------------------------------------------------
>
> Key: METAMODEL-1172
> URL: https://issues.apache.org/jira/browse/METAMODEL-1172
> Project: Apache MetaModel
> Issue Type: New Feature
> Affects Versions: 5.0.0
> Environment: Linux
> Reporter: AnandRai
> Labels: starter
> Fix For: 5.0.1
>
>
> I have schema like “_id”,"address","borough","cuisine","grades".
> Where grades is list of maps with elements like
> {code}
> [Document{{date=Fri May 14 05:30:00 IST 2021, grade=A, score=12.0}}, Document{{date=Wed Aug 13 05:30:00 IST 2025, grade=A, score=12.0}}, Document{{date=Sun Apr 04 05:30:00 IST 2027, grade=A, score=12.0}}]
> {code}
> Now if I execute query like
> {code}
> DataSet ds = mongo.executeQuery("select * from restaurants where grades[0].grade='A'");
> {code}
>
> Its failing at line 427 of MongoDbContext class final Column column = item.getSelectItem().getColumn();
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)