You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor spatial attribute handling to support NULL values and improve index validation
* fixed long-lat order for geo function
* added spatial types as filters
* index validation updates
* test update for index createion edge cases and filter encoding and decoding
if (!in_array($attributeType, [self::VAR_POINT, self::VAR_LINESTRING, self::VAR_POLYGON])) {
3331
-
thrownewDatabaseException('Spatial index can only be created on spatial attributes (point, linestring, polygon). Attribute "' . $attr . '" is of type "' . $attributeType . '"');
3332
+
thrownewIndexException('Spatial index can only be created on spatial attributes (point, linestring, polygon). Attribute "' . $attr . '" is of type "' . $attributeType . '"');
if (!\in_array($attributeType, Database::SPATIAL_TYPES, true)) {
360
+
continue;
361
+
}
362
+
363
+
if ($type !== Database::INDEX_SPATIAL) {
359
364
$this->message = 'Spatial index can only be created on spatial attributes (point, linestring, polygon). Attribute "' . $attributeName . '" is of type "' . $attributeType . '"';
if (!$required && !$this->spatialIndexNullSupport) {
365
369
$this->message = 'Spatial indexes do not allow null values. Mark the attribute "' . $attributeName . '" as required or create the index on a column with no null values.';
0 commit comments