Skip to content
Permalink
Browse files
Val_str function added for the percentile_disc function, as it can ha…
…ve result type as STRING_RESULT
  • Loading branch information
varunraiko committed Nov 1, 2017
1 parent 3393005 commit eb2187a
Showing 1 changed file with 11 additions and 0 deletions.
@@ -765,6 +765,17 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist,
return value->val_decimal(dec);
}

String* val_str(String *str)
{
if (get_row_count() == 0 || get_arg(0)->is_null())
{
null_value= true;
return 0;
}
null_value= false;
return value->val_str(str);
}

bool add()
{
Item *arg = get_arg(0);

0 comments on commit eb2187a

Please sign in to comment.