You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2015/04/26 20:30:39 UTC
[jira] [Closed] (METAMODEL-135) SQL parsing fails when 'AND' or
'OR' keywords are in caps
[ https://issues.apache.org/jira/browse/METAMODEL-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kasper Sørensen closed METAMODEL-135.
-------------------------------------
Resolution: Not A Problem
> SQL parsing fails when 'AND' or 'OR' keywords are in caps
> ---------------------------------------------------------
>
> Key: METAMODEL-135
> URL: https://issues.apache.org/jira/browse/METAMODEL-135
> Project: Apache MetaModel
> Issue Type: Task
> Reporter: Ashish Mukherjee
>
> This is what my client code is:
> DataContext dataContext = new SolrDataContext(url, index);
> DataSet dataSet = dataContext
> .executeQuery("SELECT price FROM collection1 WHERE (((manu = 'Samsung') AND name = 'hard'))");
> In my SolrDataContext class:
> FilterClause clause = q.getWhereClause();
> if (clause != null) {
> List<FilterItem> filterItemList = clause.getItems();
> boolean isFirst = true;
>
> for (FilterItem filterItem : filterItemList) {
> String expr = filterItem.getExpression();
> System.out.println(expr);
> ....
> expr is null when 'AND' is in caps but gives the correct expression when it is written as 'and' in the query. Same is true for 'OR' and 'or'. Looks like the parsing is case-sensitive somewhere.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)