Due to `sum` window aggregation the OVER clause is repeated two times from Calcite something like: CASE(>(COUNT($0) OVER (PARTITION BY $1), 0), $SUM0($0) OVER (PARTITION BY $1), null:INTEGER)
| 682 | // something like: |
| 683 | // CASE(>(COUNT($0) OVER (PARTITION BY $1), 0), $SUM0($0) OVER (PARTITION BY $1), null:INTEGER) |
| 684 | bool is_sum_window_function(std::string expression) { |
| 685 | size_t num_over_clauses = StringUtil::findAndCountAllMatches(expression, "OVER"); |
| 686 | if (num_over_clauses == 2) return true; |
| 687 | |
| 688 | return false; |
| 689 | } |
| 690 | |
| 691 | // Due to `avg` window aggregation the OVER clause is repeated three times from Calcite |
| 692 | // something like: |
no outgoing calls
no test coverage detected