protected Type extractDataType(Node operand) { Type type = null; if ( operand instanceof SqlNode ) { type = ( (SqlNode) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( (ExpectedTypeAwareNode) operand ).getExpectedType(); } return type; }
/** * Performs the operator node initialization by seeking out any parameter * nodes and setting their expected type, if possible. */ @Override public void initialize() throws SemanticException { final Node lhs = getLeftHandOperand(); if ( lhs == null ) { throw new SemanticException( "left-hand operand of a binary operator was null" ); } final Node rhs = getRightHandOperand(); if ( rhs == null ) { throw new SemanticException( "right-hand operand of a binary operator was null" ); } Type lhsType = extractDataType( lhs ); Type rhsType = extractDataType( rhs ); if ( lhsType == null ) { lhsType = rhsType; } if ( rhsType == null ) { rhsType = lhsType; } if ( ExpectedTypeAwareNode.class.isAssignableFrom( lhs.getClass() ) ) { ( (ExpectedTypeAwareNode) lhs ).setExpectedType( rhsType ); } if ( ExpectedTypeAwareNode.class.isAssignableFrom( rhs.getClass() ) ) { ( (ExpectedTypeAwareNode) rhs ).setExpectedType( lhsType ); } mutateRowValueConstructorSyntaxesIfNecessary( lhsType, rhsType ); }
( (ExpectedTypeAwareNode) fixture ).setExpectedType( expectedType ); ( (ExpectedTypeAwareNode) low ).setExpectedType( expectedType ); ( (ExpectedTypeAwareNode) high ).setExpectedType( expectedType );
private static Type extractDataType(Node operand) { if ( operand instanceof SqlNode ) { return ( (SqlNode) operand ).getDataType(); } if ( operand instanceof ExpectedTypeAwareNode ) { return ( (ExpectedTypeAwareNode) operand ).getExpectedType(); } return null; }
expectedType = rhType; ( (ExpectedTypeAwareNode) lhs ).setExpectedType( expectedType ); expectedType = lhType; ( (ExpectedTypeAwareNode) rhs ).setExpectedType( expectedType );
protected Type extractDataType(Node operand) { Type type = null; if ( operand instanceof SqlNode ) { type = ( ( SqlNode ) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType(); } return type; }
while ( inListChild != null ) { if ( ExpectedTypeAwareNode.class.isAssignableFrom( inListChild.getClass() ) ) { ( (ExpectedTypeAwareNode) inListChild ).setExpectedType( lhsType ); && ExpectedTypeAwareNode.class.isInstance( lhs ) ) { final Type rhsType = ((CollectionFunction) inListChild).getDataType(); ((ExpectedTypeAwareNode) lhs).setExpectedType( rhsType );
private static Type extractDataType(Node operand) { Type type = null; if ( operand instanceof SqlNode ) { type = ( ( SqlNode ) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType(); } return type; }
private void check(Node check, Node first, Node second) { if ( ExpectedTypeAwareNode.class.isAssignableFrom( check.getClass() ) ) { Type expectedType = null; if ( SqlNode.class.isAssignableFrom( first.getClass() ) ) { expectedType = ( ( SqlNode ) first ).getDataType(); } if ( expectedType == null && SqlNode.class.isAssignableFrom( second.getClass() ) ) { expectedType = ( ( SqlNode ) second ).getDataType(); } ( ( ExpectedTypeAwareNode ) check ).setExpectedType( expectedType ); } } }
private static Type extractDataType(Node operand) { Type type = null; if ( operand instanceof SqlNode ) { type = ( ( SqlNode ) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType(); } return type; }
private void check(Node check, Node first, Node second) { if ( ExpectedTypeAwareNode.class.isAssignableFrom( check.getClass() ) ) { Type expectedType = null; if ( SqlNode.class.isAssignableFrom( first.getClass() ) ) { expectedType = ( ( SqlNode ) first ).getDataType(); } if ( expectedType == null && SqlNode.class.isAssignableFrom( second.getClass() ) ) { expectedType = ( ( SqlNode ) second ).getDataType(); } ( ( ExpectedTypeAwareNode ) check ).setExpectedType( expectedType ); } } }
protected Type extractDataType(Node operand) { Type type = null; if ( operand instanceof SqlNode ) { type = ( ( SqlNode ) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType(); } return type; }
/** * Performs the operator node initialization by seeking out any parameter * nodes and setting their expected type, if possible. */ public void initialize() throws SemanticException { Node lhs = getLeftHandOperand(); if ( lhs == null ) { throw new SemanticException( "left-hand operand of a binary operator was null" ); } Node rhs = getRightHandOperand(); if ( rhs == null ) { throw new SemanticException( "right-hand operand of a binary operator was null" ); } Type lhsType = extractDataType( lhs ); Type rhsType = extractDataType( rhs ); if ( lhsType == null ) { lhsType = rhsType; } if ( rhsType == null ) { rhsType = lhsType; } if ( ExpectedTypeAwareNode.class.isAssignableFrom( lhs.getClass() ) ) { ( ( ExpectedTypeAwareNode ) lhs ).setExpectedType( rhsType ); } if ( ExpectedTypeAwareNode.class.isAssignableFrom( rhs.getClass() ) ) { ( ( ExpectedTypeAwareNode ) rhs ).setExpectedType( lhsType ); } mutateRowValueConstructorSyntaxesIfNecessary( lhsType, rhsType ); }
/** * Performs the operator node initialization by seeking out any parameter * nodes and setting their expected type, if possible. */ public void initialize() throws SemanticException { Node lhs = getLeftHandOperand(); if ( lhs == null ) { throw new SemanticException( "left-hand operand of a binary operator was null" ); } Node rhs = getRightHandOperand(); if ( rhs == null ) { throw new SemanticException( "right-hand operand of a binary operator was null" ); } Type lhsType = extractDataType( lhs ); Type rhsType = extractDataType( rhs ); if ( lhsType == null ) { lhsType = rhsType; } if ( rhsType == null ) { rhsType = lhsType; } if ( ExpectedTypeAwareNode.class.isAssignableFrom( lhs.getClass() ) ) { ( ( ExpectedTypeAwareNode ) lhs ).setExpectedType( rhsType ); } if ( ExpectedTypeAwareNode.class.isAssignableFrom( rhs.getClass() ) ) { ( ( ExpectedTypeAwareNode ) rhs ).setExpectedType( lhsType ); } mutateRowValueConstructorSyntaxesIfNecessary( lhsType, rhsType ); }
expectedType = rhType; ( ( ExpectedTypeAwareNode ) lhs ).setExpectedType( expectedType ); expectedType = lhType; ( ( ExpectedTypeAwareNode ) rhs ).setExpectedType( expectedType );
expectedType = rhType; ( ( ExpectedTypeAwareNode ) lhs ).setExpectedType( expectedType ); expectedType = lhType; ( ( ExpectedTypeAwareNode ) rhs ).setExpectedType( expectedType );
while ( inListChild != null ) { if ( ExpectedTypeAwareNode.class.isAssignableFrom( inListChild.getClass() ) ) { ( ( ExpectedTypeAwareNode ) inListChild ).setExpectedType( lhsType );
while ( inListChild != null ) { if ( ExpectedTypeAwareNode.class.isAssignableFrom( inListChild.getClass() ) ) { ( ( ExpectedTypeAwareNode ) inListChild ).setExpectedType( lhsType );