| 141 | } |
| 142 | |
| 143 | comparison_op::comparison_op(prod *p) : bool_binop(p) |
| 144 | { |
| 145 | auto &idx = p->scope->schema->operators_returning_type; |
| 146 | |
| 147 | auto iters = idx.equal_range(scope->schema->booltype); |
| 148 | oper = random_pick(random_pick(iters)->second); |
| 149 | |
| 150 | lhs = value_expr::factory(this, oper->left); |
| 151 | rhs = value_expr::factory(this, oper->right); |
| 152 | |
| 153 | if (oper->left == oper->right |
| 154 | && lhs->type != rhs->type) { |
| 155 | |
| 156 | if (lhs->type->consistent(rhs->type)) |
| 157 | lhs = value_expr::factory(this, rhs->type); |
| 158 | else |
| 159 | rhs = value_expr::factory(this, lhs->type); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | coalesce::coalesce(prod *p, sqltype *type_constraint, const char *abbrev) |
| 164 | : value_expr(p), abbrev_(abbrev) |
nothing calls this directly
no test coverage detected