| 31 | } |
| 32 | |
| 33 | void validateIsAllUnionOrUnionAll(const BoundRegularQuery& regularQuery) { |
| 34 | auto unionAllExpressionCounter = 0u; |
| 35 | for (auto i = 0u; i < regularQuery.getNumSingleQueries() - 1; i++) { |
| 36 | unionAllExpressionCounter += regularQuery.getIsUnionAll(i); |
| 37 | } |
| 38 | if ((0 < unionAllExpressionCounter) && |
| 39 | (unionAllExpressionCounter < regularQuery.getNumSingleQueries() - 1)) { |
| 40 | throw BinderException("Union and union all can not be used together."); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | std::unique_ptr<BoundRegularQuery> Binder::bindQuery(const Statement& statement) { |
| 45 | auto& regularQuery = statement.constCast<RegularQuery>(); |
no test coverage detected