We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statement::to_string
It seems that Statement::to_string overflows for deep expressions even if the default recursion limit is able to parse the expression without error:
#[test] fn render_overflow() { let expr = "SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1"; let statements = sqlparser::parser::Parser::parse_sql(&GenericDialect {}, expr).unwrap(); println!("Was able to parse"); assert_eq!(&statements[0].to_string(), expr); }
Outputs
Was able to parse thread 'normalize::span::description::sql::parser::render_overflow' has overflowed its stack fatal runtime error: stack overflow
Version: 0.37.0
The text was updated successfully, but these errors were encountered:
Thank you @jjbayer -- this would indeed be nice to fix.
I do suspect this would be less likely to happen in release builds
Sorry, something went wrong.
No branches or pull requests
It seems that
Statement::to_string
overflows for deep expressions even if the default recursion limit is able to parse the expression without error:Outputs
Version: 0.37.0
The text was updated successfully, but these errors were encountered: