JasonLi-cn opened a new issue, #12183:
URL: https://github.com/apache/datafusion/issues/12183

   ### Describe the bug
   
   ## SQL
   ```sql
   SELECT "test.a" FROM (SELECT a AS "test.a" FROM test)
   ```
   
   ## Bug
   
   Error: Context("Optimizer rule 'optimize_projections' failed", 
Context("optimize_projections", Internal("Failed due to a difference in 
schemas, original schema: DFSchema { inner: Schema { fields: [Field { name: 
\"test.a\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: 
false, metadata: {} }], metadata: {} }, field_qualifiers: [None], 
functional_dependencies: FunctionalDependencies { deps: [] } }, new schema: 
DFSchema { inner: Schema { fields: [Field { name: \"a\", data_type: UInt32, 
nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata: 
{} }, field_qualifiers: [Some(Bare { table: \"test\" })], 
functional_dependencies: FunctionalDependencies { deps: [] } }")))
   
   ## Other SQLs
   ```sql
   SELECT "public.test.a" FROM (SELECT a AS "public.test.a" FROM public.test)
   SELECT "datafusion.public.test.a" FROM (SELECT a AS 
"datafusion.public.test.a" FROM datafusion.public.test)
   ```
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   Return success
   
   ### 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: [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]

Reply via email to