-
Notifications
You must be signed in to change notification settings - Fork 44
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
[HOPSWORKS-1374] Append: get commit details in correct order and make upsert default op for fg.insert #132
[HOPSWORKS-1374] Append: get commit details in correct order and make upsert default op for fg.insert #132
Conversation
38288cf
to
08e36be
Compare
e30131a
to
8b48f4b
Compare
public Map<String, Map<String,String>> commitDetails() throws IOException, FeatureStoreException { | ||
return featureGroupEngine.commitDetails(this, null); | ||
} |
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.
Invert the order of these 2 functions so that they appear in the documentation from generic to specific
@@ -168,7 +170,7 @@ private FeatureGroupCommit getLastCommitMetadata(SparkSession sparkSession, Stri | |||
} | |||
|
|||
// table name | |||
String tableName = utils.getTableName(featureGroup); | |||
String tableName = featureGroup.getName() + "_" + featureGroup.getVersion(); |
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.
Use this method instead:
public String getFgName(FeatureGroup featureGroup) { |
throws IOException, FeatureStoreException { | ||
return featureGroupApi.commitDetails(featureGroup, limit); | ||
List<FeatureGroupCommit> featureGroupCommits = featureGroupApi.commitDetails(featureGroup, limit); |
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.
If there are no commits, this is going to be null and the next part of the code will trigger a NullPointerException
. Check for it.
python/hsfs/feature_group_commit.py
Outdated
@@ -38,6 +42,8 @@ def __init__( | |||
@classmethod | |||
def from_response_json(cls, json_dict): | |||
json_decamelized = humps.decamelize(json_dict) | |||
if len(json_decamelized["items"]) >= 1: |
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.
there should be a count field returned by the API that lets you know how many items there are in the list. Check if we set the count field in the CommitDTO
on the Hopsworks side.
…and make upsert default op for fg.insert (logicalclocks#132)" This reverts commit 77d103d.
No description provided.