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

   ### Describe the bug
   
   I registered a table named report.user using ctx.register_csv, but 
encountered a "failed to resolve schema: report" error in ctx.sql.
   
   ```rust
   pub async fn register(table_ref: &String, table_path: &String, ctx: 
&SessionContext, options: CsvReadOptions<'_>) {
       println!("{}: {}", table_ref, table_path);
       ctx.register_csv(table_ref, table_path, options).await.expect("TODO: 
panic message");
   }
   
   pub async fn execute(ctx: SessionContext, sql: &String) -> Vec<RecordBatch> {
       let df = ctx.sql(sql).await;
       df.unwrap().collect().await.unwrap()
   }
   ```
   
   
![Image](https://github.com/user-attachments/assets/911d724b-a1c7-44ed-a11b-8a31181b665c)
   
   ```sql
   select t1.* from order as t1 inner join report.user as t2 on (t1.id = t2.id) 
where t1.id > 2
   ```
   
   ### 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