Skip to content

Commit

Permalink
fix the column name to sneak casing
Browse files Browse the repository at this point in the history
  • Loading branch information
felixgao committed Oct 7, 2016
1 parent fd7edef commit 0e2cf84
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public boolean buildUpdatedExperiment(Experiment experiment, Experiment updates,
if (updates.getHypothesisIsCorrect() != null && !updates.getHypothesisIsCorrect().equals(experiment.getHypothesisIsCorrect())) {
builder.withHypothesisIsCorrect(updates.getHypothesisIsCorrect());
requiresUpdate = true;
changeData = new ExperimentAuditInfo("hypothesisiscorrect", experiment.getHypothesisIsCorrect(), updates.getHypothesisIsCorrect());
changeData = new ExperimentAuditInfo("hypothesis_is_correct", experiment.getHypothesisIsCorrect(), updates.getHypothesisIsCorrect());
changeList.add(changeData);
}
if (updates.getResults() != null && !updates.getResults().equals(experiment.getResults())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public CassandraExperiment(ColumnList<String> columns) {
super.setDescription(
columns.getStringValue("description", null));
super.setHypothesisIsCorrect(
columns.getStringValue("hypothesisiscorrect", null));
columns.getStringValue("hypothesis_is_correct", null));
super.setResults(
columns.getStringValue("results", null));
super.setRule(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public Experiment.ID createExperiment(NewExperiment newExperiment)
// clobbered. In practice, this should never happen, but...
// TODO: Implement a transactional recipe
final String CQL = "insert into experiment " +
"(id, description, hypothesisiscorrect, results, rule, sample_percent, start_time, end_time, " +
"(id, description, hypothesis_is_correct, results, rule, sample_percent, start_time, end_time, " +
" state, label, app_name, created, modified, is_personalized, model_name, model_version," +
" is_rapid_experiment, user_cap, creatorid) " +
"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
Expand Down Expand Up @@ -465,7 +465,7 @@ public Experiment updateExperiment(Experiment experiment)
validator.validateExperiment(experiment);

final String CQL = "update experiment " +
"set description = ?, hypothesisiscorrect = ?, results = ?, rule = ?, sample_percent = ?, " +
"set description = ?, hypothesis_is_correct = ?, results = ?, rule = ?, sample_percent = ?, " +
"start_time = ?, end_time = ?, " +
"state=?, label=?, app_name=?, modified=? , is_personalized=?, model_name=?, model_version=?," +
" is_rapid_experiment=?, user_cap=?" +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Altering experiment table to include hypothesis check and results fields

alter TABLE experiment ADD hypothesisIsCorrect varchar;
alter TABLE experiment ADD hypothesis_is_correct varchar;
alter TABLE experiment ADD results varchar;

0 comments on commit 0e2cf84

Please sign in to comment.