blob: bb4afb44688afcc9e9cdcebcbf10163f08d7a3d3 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Description : The test is intended to verify that the secondary RTree index is not used in the optimized query plan.
* : Notice the query hint to avoid using any secondary index to evaluate the predicate in the where clause
* Expected Result : Success
*
*/
drop dataverse IndexGeoJSON if exists;
create dataverse IndexGeoJSON;
use IndexGeoJSON;
CREATE TYPE GeometryType AS{
id : int,
myGeometry : geometry
};
CREATE DATASET Geometries (GeometryType) PRIMARY KEY id;
CREATE INDEX geomIndex ON Geometries(myGeometry) TYPE rtree;
SELECT VALUE geo.id
FROM Geometries geo
WHERE /* +skip-index*/ st_within(geo.myGeometry, st_geom_from_text("POLYGON((1 1,5 1,5 5,1 5,1 1))"));