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

[HOPSWORKS-1374] Append: get commit details in correct order and make upsert default op for fg.insert #132

Merged
merged 17 commits into from
Nov 9, 2020

Conversation

davitbzh
Copy link
Contributor

@davitbzh davitbzh commented Nov 5, 2020

No description provided.

@davitbzh davitbzh requested a review from SirOibaf November 5, 2020 01:04
@davitbzh davitbzh force-pushed the make_upsert_op_default branch from 38288cf to 08e36be Compare November 5, 2020 21:14
@davitbzh davitbzh force-pushed the make_upsert_op_default branch from e30131a to 8b48f4b Compare November 6, 2020 16:43
README.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
Comment on lines 374 to 376
public Map<String, Map<String,String>> commitDetails() throws IOException, FeatureStoreException {
return featureGroupEngine.commitDetails(this, null);
}
Copy link
Contributor

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();
Copy link
Contributor

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);
Copy link
Contributor

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.

@@ -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:
Copy link
Contributor

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.

@davitbzh davitbzh requested a review from SirOibaf November 9, 2020 09:23
@SirOibaf SirOibaf merged commit 77d103d into logicalclocks:master Nov 9, 2020
davitbzh pushed a commit to davitbzh/feature-store-api that referenced this pull request Nov 9, 2020
…and make upsert default op for fg.insert (logicalclocks#132)"

This reverts commit 77d103d.
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