-
Notifications
You must be signed in to change notification settings - Fork 36
feat: Add ALTER TABLE MODIFY/RESET SETTING syntax support #185
New issue
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
Conversation
- Add RESET and SETTING keywords to lexer - Implement AlterTableModifySetting and AlterTableResetSetting AST nodes - Add parsing logic for MODIFY SETTING key=value syntax - Add parsing logic for RESET SETTING key1, key2 syntax - Add visitor pattern and walk pattern support - Add comprehensive test cases for new syntax Fixes #184 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: hulk <[email protected]>
Replace manual string concatenation with reusable joinIdents() helper function. This follows the same pattern concept as AlterTableModifySetting by delegating settings formatting to a dedicated function, making the code more maintainable and consistent. Co-authored-by: hulk <[email protected]>
@claude remove test_alter_setting.go and fix lint errors. |
Claude finished @git-hulk's task —— View job Tasks
SummaryI've successfully removed the Critical Issue IdentifiedThe main problem causing test failures is missing golden files for the ALTER TABLE SETTING test cases:
Required Next StepsTo fix the lint/test errors, you need to run: make update_test This will generate the missing golden files that are required for the test suite to pass. I don't have permission to run make commands in this environment, so you'll need to run this locally and commit the generated golden files. The file removal is complete and all changes have been pushed to |
Co-authored-by: hulk <[email protected]>
@claude Use parseSettingsClause to replace parseSettingsExprOnly, and parseAlterTableReset should also use parseSettingsClause to parse settings. |
Claude finished @git-hulk's task —— View job Tasks
Changes Made✅ Replaced
✅ Refactored
✅ Code improvements:
SummaryThe parsing is now consistent: both ALTER TABLE MODIFY SETTING and RESET SETTING operations use dedicated parsing functions ( All changes have been committed and pushed to the |
- Replace parseSettingsExprOnly with parseSettingsClause for MODIFY SETTING - Refactor parseAlterTableReset to use parseIdentifierList for consistency - Remove duplicate parseSettingsExprOnly function - Add reusable parseIdentifierList function following same pattern Both MODIFY and RESET operations now use structured, consistent parsing approaches. Co-authored-by: hulk <[email protected]>
@claude Move joinIdents code into AlterTableResetSetting String function, and fix this lint error: https://github.com/AfterShip/clickhouse-sql-parser/actions/runs/17257132565/job/48971238346?pr=185 |
Claude finished @git-hulk's task —— View job I've successfully moved the joinIdents code into the AlterTableResetSetting String function and removed the separate helper function. Tasks
Changes Made✅ Inlined joinIdents logic:
✅ Code improvements:
The refactoring addresses lint concerns while preserving the exact same string output format for ALTER TABLE RESET SETTING statements. All changes have been committed and pushed to the |
Moves the joinIdents helper function code directly into the AlterTableResetSetting String() method to address lint concerns and improve code locality. Co-authored-by: hulk <[email protected]>
@claude Move |
Claude finished @git-hulk's task —— View job I've successfully moved Tasks
Changes Made✅ Inlined parseIdentifierList logic:
✅ Code improvements:
The refactoring preserves the exact same parsing behavior while making the code more maintainable. All changes have been committed and pushed to the |
…etting Move parseIdentifierList logic directly into parseAlterTableResetSetting to improve code locality and eliminate the need for a separate helper function. This follows the same pattern as other parsing functions in the codebase. Co-authored-by: hulk <[email protected]>
Pull Request Test Coverage Report for Build 17258318019Details
💛 - Coveralls |
This PR implements support for ALTER TABLE MODIFY/RESET SETTING syntax as requested in issue #184.
Changes
Syntax Support
ALTER TABLE table MODIFY SETTING key=value, key2=value2;
ALTER TABLE table RESET SETTING key1, key2;
Fixes #184
Generated with Claude Code