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

   ### Is your feature request related to a problem or challenge?
   
   After https://github.com/apache/datafusion/pull/13695, we can plan the 
implicit lateral unnest plan now. However, the generated logical plan can't be 
unparsed back to the SQL text.
   
   If we tried to unparse the plan:
   ```rust
   #[tokio::main]
   pub async fn main() -> Result<()> {
       let ctx = SessionContext::new();
       ctx.sql("CREATE TABLE t (c1 array<int>)").await?.show().await?;
       ctx.sql("INSERT INTO t VALUES (ARRAY[1, 2, 3])").await?.show().await?;
       let sql = r#"select * from t, unnest(t.c1)"#;
       println!("SQL: {}", sql);
       let df = ctx.sql(sql).await?;
       let planned = df.into_optimized_plan()?;
       println!("Plan: {}", planned);
       let sql = plan_to_sql(&planned)?;
       println!("Plan to SQL: {}", sql);
       Ok(())
   }
   ```
   We will get the unsupported error
   ```
   Error: This feature is not implemented: Unsupported operator: 
Subquery(<subquery>)
   ```
   
   ### Describe the solution you'd like
   
   Implement the unparsing behavior in `Unparser::select_to_sql_recursively`
   
   ### Describe alternatives you've considered
   
   _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