You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is Issue 241 moved from a Google Code project.
Added by 2011-02-22T12:03:11.000Z by ro.franc...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Defect, Priority-Medium, v0.9.25
Original description
We use filed names with underscore. A document is like this (json):
{
"@type": "d", "@rid": "5:0", "@class": "Item",
"bobina": "BOBINA0003",
"issue_year": "1949",
"issue_date": "04.06.1949",
"type": "issue",
"issue_edition": "0133",
"publication_code": "01",
"issue_key": "01_1949_0133",
"publication_name": "01_Pubs",
"language": "it",
"uuid": "3a79ca7a-c139-4b2c-84c4-cf46d0538c96",
"issue_edition_int": "0133",
"issue_decade": "1940"
}
Using fields whith underscore breaks the query parser:
select * from Item where issue_year > 1910 and type = 'issue' limit 10
So it seems the query parser tokenize on the underscore and then
consider YEAR as an operator.
I dived into the code, but I can't find where and if it happens.
Here's the stack trace:
com.orientechnologies.orient.core.exception.OQueryParsingException:
Error on parsing query at position #21: Unknown operator YEAR
Query: Item where issue_year > 1910 and type = 'issue'
--------------------------^
at com.orientechnologies.orient.core.sql.filter.OSQLFilter.extractConditionOperator(OSQLFilter.java:228)
at com.orientechnologies.orient.core.sql.filter.OSQLFilter.extractCondition(OSQLFilter.java:195)
at com.orientechnologies.orient.core.sql.filter.OSQLFilter.extractConditions(OSQLFilter.java:170)
at com.orientechnologies.orient.core.sql.filter.OSQLFilter.<init>(OSQLFilter.java:69)
at com.orientechnologies.orient.core.sql.OSQLEngine.parseWhereCondition(OSQLEngine.java:90)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:130)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:39)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:28)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:54)
at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:61)
at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:72)
at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:37)
The text was updated successfully, but these errors were encountered:
This is Issue 241 moved from a Google Code project.
Added by 2011-02-22T12:03:11.000Z by ro.franc...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Defect, Priority-Medium, v0.9.25
Original description
The text was updated successfully, but these errors were encountered: