-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor: cleaner cloning API #16079
Conversation
Signed-off-by: Andres Taylor <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16079 +/- ##
==========================================
+ Coverage 68.19% 68.22% +0.02%
==========================================
Files 1541 1541
Lines 197369 197371 +2
==========================================
+ Hits 134605 134650 +45
+ Misses 62764 62721 -43 ☔ View full report in Codecov by Sentry. |
Hello! 👋 This Pull Request is now handled by arewefastyet. The current HEAD and future commits will be benchmarked. You can find the performance comparison on the arewefastyet website. |
Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Harshit Gangal <[email protected]>
Refactor: Simplify Clone Usage with Generics
Summary
This PR refactors the codebase to use a more generic
Clone
method, eliminating the need to specify exact types when cloning various structures. This makes the code cleaner and more maintainable.Changes
CloneSimpleTableExpr
,CloneSQLNode
,CloneRefOfParsedComments
,CloneRefOfColumnDefinition
, etc.) to use the genericsqlparser.Clone
.Rationale
Using a generic
Clone
method reduces redundancy and potential for errors. It also enhances the maintainability of the code by centralizing cloning logic.Impact
This refactor should have no functional impact on existing features but will make the code easier to work with.