alamb commented on issue #11513:
URL: https://github.com/apache/datafusion/issues/11513#issuecomment-2380710741

   > I’d love to hear if this design is sound, or if there are any potential 
pitfalls in how I’ve approached type mapping.
   
   One thing I found a bit confusing was `ExtensionType::logical_type` in your 
example returns a `LogicalType`
   
   ```rust
   pub trait ExtensionType {
       fn logical_type(&self) -> LogicalType;
   }
   ```
   
   But one of the `LogicalType` variants is itself an `ExtensionType`
   
   ```rust
   #[derive(Clone)]
   pub enum LogicalType {
       //...
       Extenstion(Arc<dyn ExtensionType>),
   }
   ```
   
   It seems like the idea is that the logical type would report its underlying 
representation to DataFusion.
   
   I wonder when we would ever need to know the "logical_type" of an extension 
type. I think it would never make sense to DataFusion to treat a logical 
extension type as its underlying representation
   
   Just becase I know JSON columns are represented as Strings internally, I 
think they should never be treated as Strings unless the user explicitly 
requests such a conversion and the ExtensionType defines how to cast to a String


-- 
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