mirror of https://github.com/citusdata/citus.git
Fix assertions in other PG versions too, the original fix is in PR-7379
parent
b3c0be9ed3
commit
bcbb01114d
|
@ -1380,8 +1380,15 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
|
||||||
|
|
||||||
/* Assert we processed the right number of columns */
|
/* Assert we processed the right number of columns */
|
||||||
#ifdef USE_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
while (i < colinfo->num_cols && colinfo->colnames[i] == NULL)
|
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++;
|
i++;
|
||||||
|
}
|
||||||
Assert(i == colinfo->num_cols);
|
Assert(i == colinfo->num_cols);
|
||||||
Assert(j == nnewcolumns);
|
Assert(j == nnewcolumns);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1444,8 +1444,15 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
|
||||||
|
|
||||||
/* Assert we processed the right number of columns */
|
/* Assert we processed the right number of columns */
|
||||||
#ifdef USE_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
while (i < colinfo->num_cols && colinfo->colnames[i] == NULL)
|
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++;
|
i++;
|
||||||
|
}
|
||||||
Assert(i == colinfo->num_cols);
|
Assert(i == colinfo->num_cols);
|
||||||
Assert(j == nnewcolumns);
|
Assert(j == nnewcolumns);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue