-
Notifications
You must be signed in to change notification settings - Fork 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
Prevent reserved fields from being registered #819
Prevent reserved fields from being registered #819
Conversation
/test test-end-to-end |
|
||
private static void checkReservedColumns(List<FeatureSpec> featureSpecs) { | ||
List<String> reservedNames = | ||
Arrays.asList("created_timestamp", "event_timestamp", "ingestion_id", "job_id"); |
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.
These should be defined elsewhere as constants, not within the method. You can at least hoist it to the top of the class as a field.
if (reservedNames.contains(featureSpec.getName())) { | ||
throw new IllegalArgumentException( | ||
String.format( | ||
"Reserved feature names have been used, which are not allowed. These names include %s.", |
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.
Please include the field the user tried to register as well.
/test test-end-to-end-batch |
2 similar comments
/test test-end-to-end-batch |
/test test-end-to-end-batch |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pyalex, terryyylim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
What this PR does / why we need it:
This PR prevents applying of Featuresets with Feature names that are reserved.
Which issue(s) this PR fixes:
Fixes #818
Does this PR introduce a user-facing change?: