goldmedal opened a new issue, #13292:
URL: https://github.com/apache/datafusion/issues/13292

   ### Is your feature request related to a problem or challenge?
   
   In `datafusion-sqlparser-rs`, we define many SQL types but they aren't all 
required by the DataFusion core.
   
https://github.com/apache/datafusion/blob/b0b6e4427fd6bd64fc29e521c43d86206d2e4ea7/datafusion/sql/src/planner.rs#L524-L529
   
   I think it's good to provide a way to extend or customize the behavior for 
SQL type to DataFusion type (maybe changed to `NativeType` in the future) for 
the downstream project that may want to use those unsupported SQL types.
   
   ### Describe the solution you'd like
   
   Introduce a new API for `ExprPlanner`,
   ```
       /// Plan SQL type to DataFusion data type
       ///
       /// Returns None if not possible
       fn plan_data_type(&self, _sql_type: &ast::DataType) -> Option<DataType> {
           None
       }
   ```
   
   Try planning the SQL type using `ExprPlanner` first. If not present, revert 
to the default behavior.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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