2010YOUY01 commented on code in PR #14677:
URL: https://github.com/apache/datafusion/pull/14677#discussion_r1969310940


##########
datafusion/datasource/src/source.rs:
##########
@@ -43,6 +44,7 @@ pub trait DataSource: Send + Sync {
     ) -> datafusion_common::Result<SendableRecordBatchStream>;
     fn as_any(&self) -> &dyn Any;
     fn fmt_as(&self, t: DisplayFormatType, f: &mut Formatter) -> fmt::Result;
+    fn collect_info(&self) -> HashMap<String, String>;

Review Comment:
   Why do we need a new interface to collect info for pretty explain? Looks 
like it's possible to implement inside `fmt_as()`.
   DuckDB explains also have many non key-value patterns like the following 
example, we will want the formater to be more flexible.
   ```
   ┌─────────────┴─────────────┐
   │       READ_PARQUET        │
   │    ────────────────────   │
   │         Function:         │
   │        READ_PARQUET       │
   │                           │
   │        Projections:       │
   │         l_orderkey        │
   │         l_partkey         │
   │         l_suppkey         │
   │        l_linenumber       │
   │         l_quantity        │
   │      l_extendedprice      │
   │                           │
   │       ~6046496 Rows       │
   └───────────────────────────┘
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to