Item_direct_view_ref::derived_grouping_field_transformer_for_where(THD *thd,
                                                                   uchar *arg)
{
  if ((*ref)->marker & SUBSTITUTION_FL)
  {
    this->marker|= SUBSTITUTION_FL;
    return this;
  }
  if (!item_equal)
    return this;
  st_select_lex *sel= (st_select_lex *)arg;
  Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
  return gr_field->producing_item->build_clone(thd);
}
Item_direct_view_ref::derived_grouping_field_transformer_for_where(THD *thd,
                                                                   uchar *arg)
{
  if ((*ref)->marker & SUBSTITUTION_FL)
  {
    this->marker|= SUBSTITUTION_FL;
    return this;
  }
  if (!item_equal)
    return this;
  st_select_lex *sel= (st_select_lex *)arg;
  Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel);
  return gr_field->producing_item->build_clone(thd);
}