Window_spec::print(String *str, enum_query_type query_type)
{
  str->append('(');
  if (partition_list->first)
  {
    str->append(STRING_WITH_LEN(" partition by "));
    st_select_lex::print_order(str, partition_list->first, query_type);
  }
  if (order_list->first)
  {
    str->append(STRING_WITH_LEN(" order by "));
    st_select_lex::print_order(str, order_list->first, query_type);
  }
  if (window_frame)
    window_frame->print(str, query_type);
  str->append(')');
}
Window_spec::print(String *str, enum_query_type query_type)
{
  str->append('(');
  if (partition_list->first)
  {
    str->append(STRING_WITH_LEN(" partition by "));
    st_select_lex::print_order(str, partition_list->first, query_type);
  }
  if (order_list->first)
  {
    str->append(STRING_WITH_LEN(" order by "));
    st_select_lex::print_order(str, order_list->first, query_type);
  }
  if (window_frame)
    window_frame->print(str, query_type);
  str->append(')');
}