public FunctionalIndexInfo getFunctionalInfo() { if (this.functionalInfo == null) { this.functionalInfo = new MapRDBFunctionalIndexInfo(this); } return this.functionalInfo; }
private void init() { int count = 0; for (LogicalExpression indexedExpr : indexDesc.getIndexColumns()) { if (!(indexedExpr instanceof SchemaPath)) { hasFunctionalField = true; SchemaPath functionalFieldPath = SchemaPath.getSimplePath("$"+count); newPathsForIndexedFunction.add(functionalFieldPath); // now we handle only cast expression if (indexedExpr instanceof CastExpression) { // We handle only CAST directly on SchemaPath for now. SchemaPath pathBeingCasted = (SchemaPath)((CastExpression) indexedExpr).getInput(); addTargetPathForOriginalPath(pathBeingCasted, functionalFieldPath); addPathInExpr(indexedExpr, pathBeingCasted); exprToConvert.put(indexedExpr, functionalFieldPath); allPathsInFunction.add(pathBeingCasted); } count++; } } }
public MapRDBFunctionalIndexInfo(IndexDescriptor indexDesc) { this.indexDesc = indexDesc; columnToConvert = Maps.newHashMap(); exprToConvert = Maps.newHashMap(); pathsInExpr = Maps.newHashMap(); // keep the order of new paths, it may be related to the naming policy newPathsForIndexedFunction = Sets.newLinkedHashSet(); allPathsInFunction = Sets.newHashSet(); init(); }
public MapRDBFunctionalIndexInfo(IndexDescriptor indexDesc) { this.indexDesc = indexDesc; columnToConvert = Maps.newHashMap(); exprToConvert = Maps.newHashMap(); pathsInExpr = Maps.newHashMap(); // keep the order of new paths, it may be related to the naming policy newPathsForIndexedFunction = Sets.newLinkedHashSet(); allPathsInFunction = Sets.newHashSet(); init(); }
private void init() { int count = 0; for (LogicalExpression indexedExpr : indexDesc.getIndexColumns()) { if (!(indexedExpr instanceof SchemaPath)) { hasFunctionalField = true; SchemaPath functionalFieldPath = SchemaPath.getSimplePath("$"+count); newPathsForIndexedFunction.add(functionalFieldPath); // now we handle only cast expression if (indexedExpr instanceof CastExpression) { // We handle only CAST directly on SchemaPath for now. SchemaPath pathBeingCasted = (SchemaPath)((CastExpression) indexedExpr).getInput(); addTargetPathForOriginalPath(pathBeingCasted, functionalFieldPath); addPathInExpr(indexedExpr, pathBeingCasted); exprToConvert.put(indexedExpr, functionalFieldPath); allPathsInFunction.add(pathBeingCasted); } count++; } } }
public FunctionalIndexInfo getFunctionalInfo() { if (this.functionalInfo == null) { this.functionalInfo = new MapRDBFunctionalIndexInfo(this); } return this.functionalInfo; }