GeoTools

Fid filter can geneate unsupported SQL on Oracle

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.3.0
  • Fix Version/s: None
  • Component/s: arcsde plugin
  • Labels:
    None

Description

When generating the where clause for an Id filter (or Fid filter on older releases) the default is to generate an IN clause that just lists all of the supplied ids, but Oracle can have problems processing an IN clause that contains more than 1000 ids.
A option could be to break the clause into multiple IN sections and join then with an OR.

Activity

Hide
Saul Farber added a comment -
Should be fixed on trunk (2.4.x) and on the 2.3.x branch, as of revision 24969

Shaun, can you confirm the fix and close this issue if it's fixed?
Show
Saul Farber added a comment - Should be fixed on trunk (2.4.x) and on the 2.3.x branch, as of revision 24969 Shaun, can you confirm the fix and close this issue if it's fixed?
Hide
Shaun Forbes added a comment -
Checked it out and the update appears to resolve the issue.
Checked against 2.3.1 but the code looks pretty much the same for 2.4 so I guess it'll work for that version also.
Thanks.
Show
Shaun Forbes added a comment - Checked it out and the update appears to resolve the issue. Checked against 2.3.1 but the code looks pretty much the same for 2.4 so I guess it'll work for that version also. Thanks.
Hide
Shaun Forbes added a comment -
Oops, code falls over when fid filter contains a multiple of 1000 fids
Show
Shaun Forbes added a comment - Oops, code falls over when fid filter contains a multiple of 1000 fids
Hide
Shaun Forbes added a comment -
If there is 1000 fids in the filter then the SQL generated contains
 OR OBJECTID IN()
at the end
Show
Shaun Forbes added a comment - If there is 1000 fids in the filter then the SQL generated contains  OR OBJECTID IN() at the end
Hide
Shaun Forbes added a comment -
BTW, this is the change I made to resolve the problem.
Show
Shaun Forbes added a comment - BTW, this is the change I made to resolve the problem.
Hide
Gabriel Roldán added a comment -
thanks for the patch Shaun. I've applied it and extended the testMoreThan1000FidFilter test case to cover it
Show
Gabriel Roldán added a comment - thanks for the patch Shaun. I've applied it and extended the testMoreThan1000FidFilter test case to cover it

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: