You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael J. Carey (JIRA)" <ji...@apache.org> on 2018/05/19 15:19:00 UTC
[jira] [Created] (ASTERIXDB-2389) Integrate new ESRI-based spatial
support with R-Trees
Michael J. Carey created ASTERIXDB-2389:
-------------------------------------------
Summary: Integrate new ESRI-based spatial support with R-Trees
Key: ASTERIXDB-2389
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2389
Project: Apache AsterixDB
Issue Type: Improvement
Components: COMP - Compiler, DOC - Documentation, IDX - Indexes, MTD - Metadata, SQL - Translator SQL++, STO - Storage, TYPE - Data Model
Affects Versions: 0.9.4
Reporter: Michael J. Carey
Assignee: Ahmed Eldawy
Fix For: 0.9.4
This is the starting point in the codebase to add geometry type to RTree index.
*Index creation:*
QueryTranslator.java
- handleCreateIndexStatement()
- validateIndexKeyFields() : checks the key field type
- ValidateUtil.validateKeyFields()
case RTREE:
switch (fieldType.getTypeTag()) {
case POINT:
case LINE:
case RECTANGLE:
case CIRCLE:
case POLYGON:
case UNION:
break;
default:
throw new AsterixException("The field \"" + fieldName + "\" which is of type "
+ fieldType.getTypeTag() + " cannot be indexed using the RTree index.");
}
break;
- doCreateIndex
- IndexUtil.buildSecondaryIndexCreationJobSpec()
- SecondaryIndexOperationsHelper.createIndexOperationsHelper()
- case RTREE:
indexOperationsHelper =
new SecondaryRTreeOperationsHelper(dataset, index, physOptConf, metadataProvider);
break;
- runJob(hcc, spec, jobFlags);
For picking an index, the RTree relevant class is RTreeAccessMethod.
*Index pick during a query:*
IntroduceSelectAccessMethodRule.java: select access transformation
IntroduceJoinAccessMethodRule.java: join access transformation
RTreeAccessMethod: specific to RTree
- FUNC_IDENTIFIERS has a list of supported functions.
- createIndexSearchPlan: creates an MBR for the search predicate - currently for "spatial_intersect" function only
- So, for each function that you want to support, you need to generate a suitable MBR that can generate a candidate set
of the actual answer.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)