Ted-Jiang commented on issue #3140:
URL:
https://github.com/apache/arrow-datafusion/issues/3140#issuecomment-1214647151
Interesting when create table with the same data in one file the results are
same.
```
pwd
/Users/yangjiang/test-data/tpch-1g-oneFile/orders
yangjiang@LM-SHC-15009782 orders % ll
total 104112
-rw-r--r-- 1 yangjiang 110538165 0B Mar 24 16:13 _SUCCESS
-rw-r--r-- 1 yangjiang 110538165 51M Mar 24 16:13
part-00000-0e58b960-37a0-44c9-8561-53f0c32cf038-c000.snappy.parquet
Running `target/debug/datafusion-cli`
DataFusion CLI v10.0.0
❯ create external table order STORED AS PARQUET LOCATION
'/Users/yangjiang/test-data/tpch-1g-oneFile/orders' ;
0 rows in set. Query took 0.007 seconds.
❯ select o_orderstatus, approx_percentile_cont(o_totalprice, 0.5) from
order group by o_orderstatus order by 1 limit 5 ;
+---------------+-------------------------------------------------------+
| o_orderstatus | APPROXPERCENTILECONT(order.o_totalprice,Float64(0.5)) |
+---------------+-------------------------------------------------------+
| F | 143180.72188702895 |
| O | 143193.2377466576 |
| P | 181378.70468729443 |
+---------------+-------------------------------------------------------+
3 rows in set. Query took 1.190 seconds.
❯ select o_orderstatus, approx_percentile_cont(o_totalprice, 0.5) from
order group by o_orderstatus order by 1 limit 5 ;
+---------------+-------------------------------------------------------+
| o_orderstatus | APPROXPERCENTILECONT(order.o_totalprice,Float64(0.5)) |
+---------------+-------------------------------------------------------+
| F | 143180.72188702895 |
| O | 143193.2377466576 |
| P | 181378.70468729443 |
+---------------+-------------------------------------------------------+
3 rows in set. Query took 1.127 seconds.
❯ select o_orderstatus, approx_percentile_cont(o_totalprice, 0.5) from
order group by o_orderstatus order by 1 limit 5 ;
+---------------+-------------------------------------------------------+
| o_orderstatus | APPROXPERCENTILECONT(order.o_totalprice,Float64(0.5)) |
+---------------+-------------------------------------------------------+
| F | 143180.72188702895 |
| O | 143193.2377466576 |
| P | 181378.70468729443 |
+---------------+-------------------------------------------------------+
3 rows in set. Query took 1.128 seconds.
❯ select o_orderstatus, approx_percentile_cont(o_totalprice, 0.5) from
order group by o_orderstatus order by 1 limit 5 ;
+---------------+-------------------------------------------------------+
| o_orderstatus | APPROXPERCENTILECONT(order.o_totalprice,Float64(0.5)) |
+---------------+-------------------------------------------------------+
| F | 143180.72188702895 |
| O | 143193.2377466576 |
| P | 181378.70468729443 |
+---------------+-------------------------------------------------------+
3 rows in set. Query took 1.123 seconds.
❯
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]