Conversation
…age (#15644) * Show current SQL recursion limit in RecursionLimitExceeded error message * use recursion_limit setting from sql-parser-options * resolve merge conflicts * move error handling code to helper method
|
🚨 gitStream Monthly Automation Limit Reached 🚨 Your organization has exceeded the number of pull requests allowed for automation with gitStream. To continue automating your PR workflows and unlock additional features, please contact LinearB. |
Reviewer's Guide by SourceryThis pull request refactors the SQL parsing logic to improve error handling, particularly for recursion limits, and fixes a type casting issue in a Clickbench query. The parsing logic changes introduce a helper function to handle statement parsing and error messages. The Clickbench query fix ensures correct type casting for the levenshtein function. Sequence diagram for parsing a SQL statementsequenceDiagram
participant DFParser
participant Parser
DFParser->>Parser: parse_statement()
alt No RecursionLimitExceeded
Parser-->>DFParser: Statement
DFParser->>DFParser: Statement::Statement(Box::from(stmt))
DFParser-->>DFParser: Result<Statement, DataFusionError>
else RecursionLimitExceeded
Parser-->>DFParser: ParserError::RecursionLimitExceeded
DFParser->>DFParser: DataFusionError::SQL(ParserError::RecursionLimitExceeded)
DFParser-->>DFParser: Result<Statement, DataFusionError>
end
Updated class diagram for DFParserclassDiagram
class DFParser {
parser: Parser
options: SqlParserOptions
+parse_statement() Result<Statement, DataFusionError>
+parse_copy() Result<Statement, DataFusionError>
+parse_expr_with_alias() Result<Expr, DataFusionError>
+parse_and_handle_statement() Result<Statement, DataFusionError>
}
class SqlParserOptions {
recursion_limit: usize
}
DFParser -- SqlParserOptions : has a
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
* dissallow pushdown of volatile PhysicalExprs * fix * add FilteredVec helper to handle filter / remap pattern (#34) * checkpoint: Address PR feedback in https://github.com/apach... * add FilteredVec to consolidate handling of filter / remap pattern * lint * Add slt test for pushing volatile predicates down (#35) --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Improve SQL parsing and error handling in DataFusion, with minor updates to benchmark queries and test files
Bug Fixes:
Enhancements:
Chores: