Eason0729 opened a new pull request, #1468:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1468

   ## Changed
   
   under `#[cfg(feature="std")]`, `stacker::maybe_grow` was called in 
`RecursionCounter::try_decrease` to prevent stack overflow
   
   I also tested on Windows(stack size 1MB), it seems fine.
   
   ### reproducible code from original issue
   ```rust
   use datafusion::prelude::{ParquetReadOptions, SessionContext};
   
   #[tokio::main(flavor = "current_thread")]
   async fn main() -> Result<(), Box<dyn std::error::Error>> {
       let ctx = SessionContext::new();
       ctx.register_parquet(
           "parquet_table",
           "batches.parquet",
           ParquetReadOptions::default(),
       )
       .await?;
   
       let sql_query = "
       SELECT seq
       FROM (
         SELECT seq,
           LEAD(seq) OVER (ORDER BY seq) AS next_seq
           FROM parquet_table
       ) AS subquery
       WHERE next_seq - seq > 1";
   
       let df = ctx.sql(sql_query).await?;
   
       df.show().await?;
       Ok(())
   }
   ```
   
   ## Missing
   - [ ] Return error when growing stack fail:
   growing stack on unsupported target seems to be no-op on stacker side, so I 
am unable to detect it.
   - [ ] Test: which part should be tested?
   - [ ] Observe performance impact


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

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