summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.h
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2017-10-27 20:04:05 +0530
committerVarun Gupta <varunraiko1803@gmail.com>2017-11-01 23:17:15 +0530
commitab5503c8c5aca9c672db5ceb2c3636b598290a21 (patch)
tree9e3b1a3c6ba965f8791afe9735d5aa7a0a154c49 /sql/item_windowfunc.h
parent40887913ff4bb135d1b11495cd60c7a6f9402b8d (diff)
downloadmariadb-git-ab5503c8c5aca9c672db5ceb2c3636b598290a21.tar.gz
Updates the tests for the percentile functions
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r--sql/item_windowfunc.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index a3056dc222a..849c298f5aa 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -786,7 +786,7 @@ public:
value->store(order_item);
value->cache_value();
if (value->null_value)
- return false;
+ return false;
Item_sum_cume_dist::add();
double val= Item_sum_cume_dist::val_real();
@@ -821,7 +821,7 @@ public:
void fix_length_and_dec()
{
- decimals = 5; // TODO-cvicentiu find out how many decimals the standard
+ decimals = 10; // TODO-cvicentiu find out how many decimals the standard
// requires.
}
@@ -904,24 +904,24 @@ public:
floor_value->store(order_item);
floor_value->cache_value();
if (floor_value->null_value)
- return false;
+ return false;
}
if (floor_val_calculated && !ceil_val_calculated)
{
ceil_value->store(order_item);
ceil_value->cache_value();
if (ceil_value->null_value)
- return false;
+ return false;
}
Item_sum_cume_dist::add();
double val= 1 + prev_value * (get_row_count()-1);
if (!floor_val_calculated && get_row_number() == floor(val))
- floor_val_calculated= true;
+ floor_val_calculated= true;
if (!ceil_val_calculated && get_row_number() == ceil(val))
- ceil_val_calculated= true;
+ ceil_val_calculated= true;
return false;
}
@@ -951,7 +951,7 @@ public:
void fix_length_and_dec()
{
- decimals = 5; // TODO-cvicentiu find out how many decimals the standard
+ decimals = 10; // TODO-cvicentiu find out how many decimals the standard
// requires.
}