@@ -3742,7 +3742,7 @@ vops_update_vars_clusters(vops_pullvar_context *ctx)
3742
3742
}
3743
3743
3744
3744
/*
3745
- * Check that all variables used together are both either scalar, eithe vector.
3745
+ * Check that all variables used together are both either scalar, either vector.
3746
3746
*/
3747
3747
static bool
3748
3748
vops_check_clusters (vops_vars_cluster * clusters , Bitmapset * vectorCols , Bitmapset * scalarCols )
@@ -4146,11 +4146,11 @@ vops_substitute_tables_with_projections(char const* queryString, Query *query)
4146
4146
/* Update vector/scalar bitmap sets for this query for this projection */
4147
4147
for (j = 0 ; j < nVectorColumns ; j ++ )
4148
4148
{
4149
- vectorCols = bms_add_member (vectorCols , DatumGetInt32 (vectorAttnos [j ])* n_rels + relno - 1 );
4149
+ vectorCols = bms_add_member (vectorCols , DatumGetInt32 (vectorAttnos [j ])* n_rels + relno );
4150
4150
}
4151
4151
for (j = 0 ; j < nScalarColumns ; j ++ )
4152
4152
{
4153
- scalarCols = bms_add_member (scalarCols , DatumGetInt32 (scalarAttnos [j ])* n_rels + relno - 1 );
4153
+ scalarCols = bms_add_member (scalarCols , DatumGetInt32 (scalarAttnos [j ])* n_rels + relno );
4154
4154
}
4155
4155
if (keyName != NULL && select -> whereClause )
4156
4156
{
@@ -4194,7 +4194,7 @@ vops_substitute_tables_with_projections(char const* queryString, Query *query)
4194
4194
/* Add all used attributes to set of scalar columns */
4195
4195
while ((bit = bms_next_member (all , bit )) >= 0 )
4196
4196
{
4197
- scalarCols = bms_add_member (scalarCols , bit * n_rels + relno - 1 );
4197
+ scalarCols = bms_add_member (scalarCols , bit * n_rels + relno );
4198
4198
}
4199
4199
MemoryContextSwitchTo (spi_memctx );
4200
4200
}
0 commit comments