korowa commented on code in PR #7459:
URL: https://github.com/apache/arrow-datafusion/pull/7459#discussion_r1312634269
##########
datafusion/sqllogictest/test_files/explain.slt:
##########
@@ -251,3 +251,22 @@ physical_plan after EnforceSorting SAME TEXT AS ABOVE
physical_plan after coalesce_batches SAME TEXT AS ABOVE
physical_plan after PipelineChecker SAME TEXT AS ABOVE
physical_plan CsvExec: file_groups={1 group:
[[WORKSPACE_ROOT/datafusion/core/tests/data/example.csv]]}, projection=[a, b,
c], has_header=true
+
+
+# test EXPLAIN with display statistics enabled
+statement ok
+set datafusion.explain.show_statistics = true;
+
+query TT
+EXPLAIN SELECT a, b, c FROM simple_explain_test limit 10;
+----
+logical_plan
+Limit: skip=0, fetch=10
+--TableScan: simple_explain_test projection=[a, b, c], fetch=10
+physical_plan
+GlobalLimitExec: skip=0, fetch=10, statistics=[rows=10, bytes=None,
exact=false]
+--CsvExec: file_groups={1 group:
[[WORKSPACE_ROOT/datafusion/core/tests/data/example.csv]]}, projection=[a, b,
c], limit=10, has_header=true, statistics=[]
Review Comment:
Added test for parquet with collected statistics (however at this moment
`bytes` are not collected for parquet files -- only rowcounts are available).
Also, statistics is defined for in-memory tables and `VALUES` function output,
but I believe their inner record batches could possibly have different memory
size, depending on environment.
--
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]