yoavcloud commented on code in PR #2298: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2298#discussion_r3064489603
########## AGENTS.md: ########## @@ -0,0 +1,47 @@ +# Extensible SQL Lexer and Parser for Rust Agents Guidelines + +## General Agent Workflow +1. You will receive a coding task from your operator. +2. You will analyze the task and come up with a code change to complete it. +3. You will write unit tests to ensure your code change is working as expected. +4. You will run the commands in the Pre Commit Checks section below to ensure your change is ready for a pull request. +5. When instructed to open a PR, you will follow the instructions in the Pull Request Guidelines section below. + +## Agent Workflow for Fixing Parsing Issues in SQL Statements +1. You will receive a SQL statement that is not parsed correctly by the project. Typically parsing will fail with an error. +2. You will add a unit test to check that the SQL statement is indeed unparsed. Follow the instructions in the "Unit Tests" section below. +3. You will analyze why the SQL statement is not parsed correctly, pointing to the code section that you think is faulty. See more info in the Analyzing Parsing Issues and General Coding Guidelines below. +4. You will fix the parsing issue and ensure that the new unit test passes successfully by running `cargo test --all-features`. +5. You will remove the first unit test that you added in step 2 and instead create "synthetic" unit tests to cover the code sections that you modified, to ensure that similar parsing issues are caught in the future. Review Comment: The SQL statements I use are typically representative of what we encounter “in the wild.” They tend to be large and complex, with most of the SQL being irrelevant to the specific issue the change addresses. As a result, they are not ideal candidates for unit tests. To improve maintainability, I convert them into canonical forms. However, this is my own workflow, so I removed it from the repo and will keep it local for now. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
