comphead commented on issue #2877:
URL: 
https://github.com/apache/arrow-datafusion/issues/2877#issuecomment-1203327882

   Rev engineered data from sqlfuzz, quick test to reproduce the behavior
   ```
   #[tokio::test]
       async fn hj_non_compat() -> Result<()> {
           let schema = Arc::new(Schema::new(vec![
               arrow::datatypes::Field::new(
               "column_1",
               DataType::Int32,
               false,
           ),
           arrow::datatypes::Field::new(
               "column_2",
               DataType::Int8,
               false,
           )
           
           ]));
   
           let data = RecordBatch::try_new(
               schema.clone(),
               vec![
                   Arc::new(arrow::array::Int32Array::from(vec![
                       Some(1),
                   ])),
                   Arc::new(arrow::array::Int8Array::from(vec![
                       Some(1),
                   ])),
               ],
           )?;
   
           let table = crate::datasource::MemTable::try_new(schema, 
vec![vec![data]])?;
   
           let ctx = SessionContext::new();
           ctx.register_table("test", Arc::new(table))?;
   
           let sql = r#"
           SELECT 
               *
           FROM 
               test a right join test b on a.column_1 = b.column_2"#;
   
           let df = ctx.sql(sql).await.unwrap();
           df.show_limit(10).await.unwrap();
   
           Ok(())
       }
   ```
   
   Right, the problem is non compat downcast


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

Reply via email to