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

   ### Describe the bug
   
   Constructing a schema with duplicate identical qualified names does not 
produce an error. I think it should, or we should extend the documentation of 
`DFSchema::check_names` to explain why those are allowed and where they are 
needed. 
   
   ### To Reproduce
   
   ```rust
   use arrow_schema::{DataType, Field};
   use datafusion_common::DFSchema;
   use datafusion_sql::TableReference;
   use std::sync::Arc;
   
   #[test]
   fn schema_join() {
       let t = || TableReference::bare("t");
       let schema = DFSchema::new_with_metadata(
           vec![
               (Some(t()), Arc::new(Field::new("a", DataType::Int64, true))),
               (Some(t()), Arc::new(Field::new("a", DataType::Utf8, false))),
           ],
           Default::default(),
       )
       .expect("schema");
       let schema = format!("{schema:#?}");
       println!("{schema}");
   }
   ```
   
   ### Expected behavior
   
   Reading through the comments, I would expect to see an error thrown by the 
`join` method in this case.
   
   ### Additional context
   
   I found this while working on #11456.


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