[ https://issues.apache.org/jira/browse/ASTERIXDB-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Till Westmann updated ASTERIXDB-2389: ------------------------------------- Fix Version/s: 0.9.8 (was: 0.9.7) > 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 > Priority: Major > Fix For: 0.9.8 > > Original Estimate: 672h > Remaining Estimate: 672h > > 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 (v8.20.1#820001)