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

   ### Describe the bug
   
   The logical plan for all UDTFs is a table scan with a fixed table name 
`tmp_table` 
([source](https://github.com/apache/datafusion/blob/5ca4ff02932eecdd203b1b90acaf4381c0d5cb5c/datafusion/sql/src/relation/mod.rs#L69)).
   
    For example:
   ```
   
+---------------+----------------------------------------------------------------+
   | plan_type     | plan                                                       
    |
   
+---------------+----------------------------------------------------------------+
   | logical_plan  | Limit: skip=0, fetch=4                                     
    |
   |               |   BytesProcessedNode                                       
    |
   |               |     TableScan: tmp_table projection=[location, score], 
fetch=4 |
   
+---------------+----------------------------------------------------------------+
   ```
   
   This hinders the ability to define `AnalyzerRule`s via the tree node API 
that look for a given UDTF. 
   
   An example solution would be to use the UDTF name as the table name. This 
change on a datafusion fork is an example fix:  
https://github.com/spiceai/datafusion/pull/91
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _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