tobixdev commented on code in PR #18552:
URL: https://github.com/apache/datafusion/pull/18552#discussion_r2671521215
##########
datafusion/core/src/dataframe/array_formatter_factory.rs:
##########
@@ -0,0 +1,51 @@
+use arrow::array::Array;
+use arrow::util::display::{ArrayFormatter, ArrayFormatterFactory,
FormatOptions};
+use arrow_schema::{ArrowError, Field};
+use datafusion_expr::registry::ExtensionTypeRegistry;
+use std::sync::Arc;
+
+/// A factory for creating [`ArrayFormatter`]s that checks whether a
registered extension type can
+/// format a given array based on its metadata.
+#[derive(Debug)]
+pub struct DFArrayFormatterFactory {
Review Comment:
DataFusion's implementation for record batch pretty-prining.
Basically:
1. Check if extension type is present
2. If yes, check if it is registered
3. If yes, check if there is a custom pretty printer
4. If yes, use that pretty pringer
Otherwise use the default formatter
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]