internal SqlBinary Binary(SqlNodeType nodeType, SqlExpression left, SqlExpression right, MethodInfo method, Type clrType)
        {
            ProviderType sqlType = null;

            if (nodeType.IsPredicateBinaryOperator())
            {
                if (clrType == null)
                {
                    clrType = typeof(bool);
                }
                sqlType = typeProvider.From(clrType);
            }
            else
            {
                ProviderType resultType = this.typeProvider.PredictTypeForBinary(nodeType, left.SqlType, right.SqlType);
                if (resultType == right.SqlType)
                {
                    if (clrType == null)
                    {
                        clrType = right.ClrType;
                    }
                    sqlType = right.SqlType;
                }
                else if (resultType == left.SqlType)
                {
                    if (clrType == null)
                    {
                        clrType = left.ClrType;
                    }
                    sqlType = left.SqlType;
                }
                else
                {
                    sqlType = resultType;
                    if (clrType == null)
                    {
                        clrType = resultType.GetClosestRuntimeType();
                    }
                }
            }
            return(new SqlBinary(nodeType, clrType, sqlType, left, right, method));
        }
 internal SqlBinary Binary(SqlNodeType nodeType, SqlExpression left, SqlExpression right, MethodInfo method, Type clrType) {
     ProviderType sqlType = null;
     if (nodeType.IsPredicateBinaryOperator()) {
         if (clrType == null) {
             clrType = typeof(bool);
         }
         sqlType = typeProvider.From(clrType);
     }
     else {
         ProviderType resultType = this.typeProvider.PredictTypeForBinary(nodeType, left.SqlType, right.SqlType);
         if (resultType == right.SqlType) {
             if (clrType == null) {
                 clrType = right.ClrType;
             }
             sqlType = right.SqlType;
         }
         else if (resultType == left.SqlType) {
             if (clrType == null) {
                 clrType = left.ClrType;
             }
             sqlType = left.SqlType;
         }
         else {
             sqlType = resultType;
             if (clrType == null) {
                 clrType = resultType.GetClosestRuntimeType();
             }
         }
     }
     return new SqlBinary(nodeType, clrType, sqlType, left, right, method);
 }