-
Notifications
You must be signed in to change notification settings - Fork 544
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
Generate APIs to build field mask as a Map directly. #557
Conversation
d690060
to
142919d
Compare
the fields parameter.
142919d
to
c5c1901
Compare
@@ -47,14 +44,14 @@ | |||
* The semantics of applying a MaskTree to a DataMap are documented in {@link com.linkedin.data.transform.DataComplexProcessor} | |||
*/ | |||
|
|||
public class MaskTree | |||
public class MaskTree extends FieldMask |
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.
Do you think we should come up a better name? MaskMap
or something? I feel MaskTree are not necessarily superset of FieldMask by its name. I felt that it is only after we connect it to the request builder or data template that we bring the concept of "field".
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.
MaskMap was my first choice :) and renamed it to FieldMask as this is actually storing mask for the field tree.
I see your point that this can represent any generic mask. I can rename it back.
generator/src/main/java/com/linkedin/pegasus/generator/PegasusDataTemplateGenerator.java
Show resolved
Hide resolved
generator/src/main/java/com/linkedin/pegasus/generator/JavaDataTemplateGenerator.java
Outdated
Show resolved
Hide resolved
generator/src/main/java/com/linkedin/pegasus/generator/JavaDataTemplateGenerator.java
Show resolved
Hide resolved
generator/src/main/java/com/linkedin/pegasus/generator/JavaDataTemplateGenerator.java
Outdated
Show resolved
Hide resolved
restli-client/src/test/java/com/linkedin/restli/internal/client/TestQueryParamsUtil.java
Outdated
Show resolved
Hide resolved
@@ -23,6 +23,7 @@ | |||
public static final String WILDCARD = "$*"; | |||
public static final String START = "$start"; | |||
public static final String COUNT = "$count"; | |||
public static final int NUMBER_OF_ARRAY_ATTRIBUTES = 2; // start and count. |
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.
Sorry for my last comment. It might be better:
public static final Set<String> ARRAY_ATTRIBUTES = new HashSet<>(Arrays.asList(START, COUNT));
And then use ARRAY_ATTRIBUTES.size()
in the code
Updated client APIs to accept the field mask as value for projection parameters.