mirror of https://github.com/citusdata/citus.git
Remove incorrect assertion from Postgres ruleutils. (#8136)
DESCRIPTION: Remove an assertion from Postgres ruleutils that was rendered meaningless by a previous Citus commit. Fixes #8123. This has been present sincerelease-12.1-onur00068e0, which changed the code preceding the assert as follows: ``` - while (i < colinfo->num_cols && colinfo->colnames[i] == NULL) - i++; + for (int col_index = 0; col_index < colinfo->num_cols; col_index++) + { + /* + * In the above processing-loops, "i" advances only if + * the column is not new, check if this is a new column. + */ + if (colinfo->is_new_col[col_index]) + i++; + } Assert(i == colinfo->num_cols); Assert(j == nnewcolumns); ``` This commit altered both the loop condition and the incrementing of `i`. After analysis, the assert no longer makes sense. cherry-picked frombd0558fe39
parent
be7cb46ddf
commit
d7c48a9d1e
|
|
@ -1535,7 +1535,6 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
|
|||
if (colinfo->is_new_col[col_index])
|
||||
i++;
|
||||
}
|
||||
Assert(i == colinfo->num_cols);
|
||||
Assert(j == nnewcolumns);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1572,7 +1572,6 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
|
|||
if (colinfo->is_new_col[col_index])
|
||||
i++;
|
||||
}
|
||||
Assert(i == colinfo->num_cols);
|
||||
Assert(j == nnewcolumns);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1589,7 +1589,6 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
|
|||
if (colinfo->is_new_col[col_index])
|
||||
i++;
|
||||
}
|
||||
Assert(i == colinfo->num_cols);
|
||||
Assert(j == nnewcolumns);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue