Skip to content
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

Case normalize #1027

Open
wants to merge 11 commits into
base: mappings
Choose a base branch
from
Open

Case normalize #1027

wants to merge 11 commits into from

Conversation

Nitish1814
Copy link
Contributor

No description provided.

Copy link
Member

@sonalgoyal sonalgoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall. minor comments.

@@ -0,0 +1,88 @@
package zingg.common.core.preprocess.caseNormalize;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java packages should have all lowercase. we messed up at infraForTest but lets follow the convention

import java.util.ArrayList;
import java.util.List;

public abstract class CaseNormalizer<S,D,R,C,T> implements IMultiFieldPreprocessor<S,D,R,C,T> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to break it down into one abstract class AMultiFieldPreproc and then extend it. So other multi preprocs would not need to define any of the getter setters


@Override
public boolean isApplicable() {
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should return true only when you have string fields

List<String> stringFields = new ArrayList<>();
for (FieldDefinition fieldDefinition : fieldDefinitions) {
if (fieldDefinition.dataType != null && fieldDefinition.matchType != null &&
fieldDefinition.dataType.equalsIgnoreCase(STRING_TYPE) && !fieldDefinition.matchType.contains(MatchTypes.DONT_USE)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets discuss this. so far we have always abstracted dataType

Copy link
Member

@sonalgoyal sonalgoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants