Bug 100803 - SQL parser barfs with nested functions
Summary: SQL parser barfs with nested functions
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence (Show other bugs)
(Show other bugs)
Version: nightly
Hardware: All Linux
medium
high
Target Milestone: ---
Assignee: Rafael H. Schloming
QA Contact: Jon Orris
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-25 17:35 UTC by Daniel Berrange
Modified: 2014-12-01 23:13 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Daniel Berrange 2003-07-25 17:35:20 UTC
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-18 03:55:05 UTC
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 17:40:48 UTC
Closing old tickets




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