@Override public void resolveInFunctionCall(boolean generateJoin, boolean implicitJoin) throws SemanticException { if ( isResolved() ) { return; } Type propertyType = prepareLhs(); // Prepare the left hand side and get the data type. if ( propertyType != null && propertyType.isCollectionType() ) { resolveIndex( null ); } else { resolveFirstChild(); super.resolve( generateJoin, implicitJoin ); } }
dotNode.resolveFirstChild(); return dotNode;
@Override public void resolveInFunctionCall(boolean generateJoin, boolean implicitJoin) throws SemanticException { if ( isResolved() ) { return; } Type propertyType = prepareLhs(); // Prepare the left hand side and get the data type. if ( propertyType!=null && propertyType.isCollectionType() ) { resolveIndex(null); } else { resolveFirstChild(); super.resolve(generateJoin, implicitJoin); } }
@Override public void resolveInFunctionCall(boolean generateJoin, boolean implicitJoin) throws SemanticException { if ( isResolved() ) { return; } Type propertyType = prepareLhs(); // Prepare the left hand side and get the data type. if ( propertyType!=null && propertyType.isCollectionType() ) { resolveIndex(null); } else { resolveFirstChild(); super.resolve(generateJoin, implicitJoin); } }
@Override protected AST lookupProperty(AST dot, boolean root, boolean inSelect) throws SemanticException { DotNode dotNode = ( DotNode ) dot; FromReferenceNode lhs = dotNode.getLhs(); AST rhs = lhs.getNextSibling(); switch ( rhs.getType() ) { case SqlTokenTypes.ELEMENTS: case SqlTokenTypes.INDICES: if (LOG.isDebugEnabled()) LOG.debugf("lookupProperty() %s => %s(%s)", dotNode.getPath(), rhs.getText(), lhs.getPath()); CollectionFunction f = ( CollectionFunction ) rhs; // Re-arrange the tree so that the collection function is the root and the lhs is the path. f.setFirstChild( lhs ); lhs.setNextSibling( null ); dotNode.setFirstChild( f ); resolve( lhs ); // Don't forget to resolve the argument! f.resolve( inSelect ); // Resolve the collection function now. return f; default: // Resolve everything up to this dot, but don't resolve the placeholders yet. dotNode.resolveFirstChild(); return dotNode; } }
@Override protected AST lookupProperty(AST dot, boolean root, boolean inSelect) throws SemanticException { DotNode dotNode = ( DotNode ) dot; FromReferenceNode lhs = dotNode.getLhs(); AST rhs = lhs.getNextSibling(); switch ( rhs.getType() ) { case SqlTokenTypes.ELEMENTS: case SqlTokenTypes.INDICES: if (LOG.isDebugEnabled()) LOG.debugf("lookupProperty() %s => %s(%s)", dotNode.getPath(), rhs.getText(), lhs.getPath()); CollectionFunction f = ( CollectionFunction ) rhs; // Re-arrange the tree so that the collection function is the root and the lhs is the path. f.setFirstChild( lhs ); lhs.setNextSibling( null ); dotNode.setFirstChild( f ); resolve( lhs ); // Don't forget to resolve the argument! f.resolve( inSelect ); // Resolve the collection function now. return f; default: // Resolve everything up to this dot, but don't resolve the placeholders yet. dotNode.resolveFirstChild(); return dotNode; } }