Skip to content

Commit

Permalink
add sql level test for decimal data type (#2200)
Browse files Browse the repository at this point in the history
* add sql level test for decimal data type

* add decimal test

* add license for new file

* address comments
  • Loading branch information
liukun4515 authored Apr 14, 2022
1 parent b1a28d0 commit 8d5bb47
Show file tree
Hide file tree
Showing 5 changed files with 506 additions and 37 deletions.
3 changes: 1 addition & 2 deletions datafusion/core/src/physical_plan/aggregate_rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ mod tests {
];
let input_types = vec![
vec![DataType::Int32],
// support the decimal data type for min/max agg
// vec![DataType::Decimal(10, 2)],
vec![DataType::Decimal(10, 2)],
vec![DataType::Utf8],
];
for fun in funs {
Expand Down
16 changes: 16 additions & 0 deletions datafusion/core/tests/decimal_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
c1,c2,c3,c4,c5
0.00001,0.000000000001,1,true,0.000014
0.00002,0.000000000002,2,true,0.000025
0.00002,0.000000000002,3,false,0.000019
0.00003,0.000000000003,4,true,0.000032
0.00003,0.000000000003,5,false,0.000035
0.00003,0.000000000003,5,true,0.000011
0.00004,0.000000000004,5,true,0.000044
0.00004,0.000000000004,12,false,0.000040
0.00004,0.000000000004,14,true,0.000040
0.00004,0.000000000004,8,false,0.000044
0.00005,0.000000000005,9,true,0.000052
0.00005,0.000000000005,4,true,0.000078
0.00005,0.000000000005,8,false,0.000033
0.00005,0.000000000005,100,true,0.000068
0.00005,0.000000000005,1,false,0.000100
Loading

0 comments on commit 8d5bb47

Please sign in to comment.