Changes between Version 5 and Version 6 of MapGuideRfc123
- Timestamp:
- 10/27/11 08:55:22 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc123
v5 v6 41 41 == Proposed Solution == 42 42 43 The solution consists of 3parts:43 The solution consists of 4 parts: 44 44 45 45 * Testing for the FDO join optimization path when performing a SelectFeatures() call against an extended feature class 46 46 * Setting up the FDO join query. 47 47 * Handling the iteration logic for the results of a FDO join query. 48 * Handling aggregates 48 49 49 50 Each part is explained in detail below. … … 53 54 When performing a feature query against an extended feature class that consists of joins, use the FDO join APIs if the extended feature class satisfies the following criteria: 54 55 56 '''Regular selects''' 57 55 58 * The Feature Source this extended feature class belongs to supports joins (ie. The SupportJoins capability returns true) 56 59 * The Feature Source this extended feature class belongs to joins with another feature class from '''the same feature source''' (this is because FDO Joins work within the context of the same connection). The feature class being joined on cannot itself be an extended feature class. 57 60 * The extended feature class only contains one join. Supporting chained or multiple joins is beyond the scope of this RFC. 58 * If this extended feature class is being queried with a filter, the filter does not contain any references to properties on the feature class to be joined on. 61 * If this extended feature class is being queried with a filter, the filter does not contain any references to properties on the feature class to be joined on. This is because there is no way I am aware of in the FDO Join API to apply filters to the non-primary sides of the join. 59 62 * The type of join being performed is supported by the underlying FDO provider. 63 64 '''Select Aggregate''' 65 * All the above conditions 66 * The extended feature class is being queried cannot have 1:1 forced on it unless the aggregate function is SpatialExtents(), Min() or Max(). This is due to my current findings where an FDO select aggregate operation that contains an aggregate function can produce incorrect results because there is nothing in the FDO select aggregate API equivalent to the force 1:1 behavior. Including the identity properties of the primary class in the query with the distinct flag activated does not produce the intended results. The reason SpatialExtents(), Min() and Max() is exempt is because duplicated primary class features won't affect the final aggregate result with these functions, thus these aggregate functions are safe to use, whereas other aggregate functions like Sum() or Avg() would produce distorted results from the duplicated primary class features. 60 67 61 68 If any of the above criteria is not met, the extended feature class in question is considered not to meet the FDO join requirements and is delegated off to the GWS Query Engine as it currently is.