Bug 100803 - SQL parser barfs with nested functions
SQL parser barfs with nested functions
Status: CLOSED WONTFIX
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence (Show other bugs)
nightly
All Linux
medium Severity high
: ---
: ---
Assigned To: Rafael H. Schloming
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-25 13:35 EDT by Daniel Berrange
Modified: 2014-12-01 18:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-02 13:40:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2003-07-25 13:35:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
When defining an SQL filter condition with a nested filter such as

upper(nvl(primary_email) || nvl(name))

the persistence SQL parser dies with an IllegalArgumentException

java.lang.IllegalArgumentException: no such path: nvl
	at com.redhat.persistence.engine.rdbms.QGen.genPath(QGen.java:474)
	at com.redhat.persistence.engine.rdbms.QGen.access$500(QGen.java:21)
	at com.redhat.persistence.engine.rdbms.QGen$4.map(QGen.java:604)
	at com.redhat.persistence.common.SQLParser.parens(SQLParser.java(Compiled Code))
	at
com.redhat.persistence.common.SQLParser.unstructuredElementNoComma(SQLParser.java(Compiled
Code))
	at
com.redhat.persistence.common.SQLParser.unstructuredElement(SQLParser.java(Compiled
Code))
	at com.redhat.persistence.common.SQLParser.sql(SQLParser.java:237)
	at com.redhat.persistence.engine.rdbms.QGen$2.onPassthrough(QGen.java:611)
	at com.redhat.persistence.Expression$Passthrough.dispatch(Expression.java:80)
	at com.redhat.persistence.engine.rdbms.QGen.generate(QGen.java(Inlined Compiled
Code))
	at com.redhat.persistence.engine.rdbms.QGen.generate(QGen.java(Compiled Code))
	at com.redhat.persistence.engine.rdbms.RDBMSEngine.size(RDBMSEngine.java:225)
	at com.redhat.persistence.engine.rdbms.RDBMSEngine.size(RDBMSEngine.java:217)
	at com.redhat.persistence.DataSet.size(DataSet.java:45)
	at com.redhat.persistence.DataSet.size(DataSet.java:40)
	at com.arsdigita.persistence.DataQueryImpl.size(DataQueryImpl.java:455)
	at com.arsdigita.cms.ui.PartyAddForm.generateXML(PartyAddForm.java:283)


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a query containing a nested function in the filter:

upper(nvl(primary_email) || nvl(name)) like '%foo%'

2. Run the resulting query
3.
    

Actual Results:  An illegal state exception is thrown

Expected Results:  The query is run

Additional info:
Comment 1 David Lawrence 2006-07-17 23:55:05 EDT
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.
Comment 2 Daniel Berrange 2006-09-02 13:40:48 EDT
Closing old tickets


Note You need to log in before you can comment on or make changes to this bug.