Eliminate nested filter SQL statements if nesting is not required
For RDBMS systems, the process transferring a filter into a SQL statement creates many nested levels if the filter contains binary logical operations. The nesting is done in any case although not always required. For example, a filter stating id = 1 or id = 2 or id = 3 or id = 4 should not produce the SQL statement ((((id = 1) or (id = 2)) or (id = 3)) or (id = 4)) but rather (id = 1) or (id = 2) or (id = 3) or (id = 4). In some RDBMS systems - like ODBC - nesting may also result in a failure when a command with such a filter is executed due to system limitations (ODBC can only handle up to 26 levels of nesting).
Change History
(3)
Owner: |
changed from gregboone to thomasknoell
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
The issue has been fixed. The following files were added or modified:
Adding: Providers\GenericRdbms\Src\UnitTest\Common\FdoFilterTest.cpp Adding: Providers\GenericRdbms\Src\UnitTest\Common\FdoFilterTest.h Adding: Providers\GenericRdbms\Src\UnitTest\MySql\MySqlFdoFilterTest.cpp Adding: Providers\GenericRdbms\Src\UnitTest\MySql\MySqlFdoFilterTest.h Adding: Providers\GenericRdbms\Src\UnitTest\SQLServerSpatial\SqlServerFdoFilterTest.cpp Adding: Providers\GenericRdbms\Src\UnitTest\SQLServerSpatial\SqlServerFdoFilterTest.h
Modified: Providers\ArcSDE\Src\Provider\ArcSDEFilterToSql.cpp Modified: Providers\ArcSDE\Src\Provider\ArcSDEFilterToSql.h Modified: Providers\ArcSDE\Src\Provider\ArcSDEUtils.cpp Modified: Providers\GenericRdbms\Src\Fdo\Filter\FdoRdbmsFilterProcessor.cpp Modified: Providers\GenericRdbms\Src\Fdo\Filter\FdoRdbmsFilterProcessor.h Modified: Providers\GenericRdbms\Src\UnitTest\Common\Makefile.am Modified: Providers\GenericRdbms\Src\UnitTest\MySql\Makefile.am Modified: Providers\GenericRdbms\Src\UnitTest\UnitTestMySql.vcproj Modified: Providers\GenericRdbms\Src\UnitTest\UnitTestSQLServerSpatial.vcproj Modified: Providers\GenericRdbms\Src\ODBC\Fdo\FdoRdbmsOdbcFilterProcessor.cpp