Whether row i equals one of the first `kept` rows, column by column. */
| 4060 | |
| 4061 | /* Whether row i equals one of the first `kept` rows, column by column. */ |
| 4062 | static bool rb_row_seen_before(const result_builder_t *rb, int i, int kept) { |
| 4063 | for (int j = 0; j < kept; j++) { |
| 4064 | bool same = true; |
| 4065 | for (int c = 0; c < rb->col_count && same; c++) { |
| 4066 | same = strcmp(rb->rows[i][c], rb->rows[j][c]) == 0; |
| 4067 | } |
| 4068 | if (same) { |
| 4069 | return true; |
| 4070 | } |
| 4071 | } |
| 4072 | return false; |
| 4073 | } |
| 4074 | |
| 4075 | static void rb_apply_distinct(result_builder_t *rb) { |
| 4076 | if (rb->row_count <= SKIP_ONE) { |