-
Notifications
You must be signed in to change notification settings - Fork 12
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
HCK-7055 - Fix sonarlint reports #219
Conversation
@@ -1321,6 +1304,7 @@ class Visitor extends HiveParserVisitor { | |||
}; | |||
} | |||
|
|||
// Check that this function is identical to the visitCreateBloomfilterIndexMainStatement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be assessed how you want to tackle that especially because semantically visiting the create and the drop statement share the exact same logic duplicated (not super obvious why because one could expect the must return different things...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bigorn0 We can move duplicated logic inside these two methods to a separate method in the visitor class, but having two entry points (visitDropBloomfilterIndexMainStatement
and visitCreateBloomfilterIndexMainStatement
) is required by ANTLR4 grammar - we should keep them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is indeed required, shouldn't we expect different information extracted et returned by the visitor function for create vs drop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both methods return objects that represent BloomfilterIndex even if it's a DROP statement. As I know originally it was a requirement to parse such statements (DROP... statements) and reverse them in the Hackolade model as deactivated objects. But the BloomfilterIndexes doesn't have the isActivated
property - so as a result we have the identical logic and it's expected for now I supose.
@@ -649,10 +642,6 @@ class Visitor extends HiveParserVisitor { | |||
} | |||
} | |||
|
|||
visitAlterStatementSuffixRename(ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted the wrong one 🙂 the last one declared takes precedence afaik, so this particular one was in use
Quality Gate passedIssues Measures |
Content
Fixes https://sonarcloud.io/project/issues?impactSoftwareQualities=RELIABILITY&resolved=false&impactSeverities=MEDIUM&id=hackolade_DeltaLake