Skip to content
Snippets Groups Projects
Commit ca2ac40c authored by Mirco Nasuti's avatar Mirco Nasuti
Browse files

bugfix: add new variable to query

parent 622aa78d
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ public class VariablesApi {
String histogramGroupings = data.getString("histogram_groupings");
MiningQuery query = new MiningQuery();
query.setVariables(query.getVariables().add(new Variable(code)));
query.addVariable(new Variable(code));
List<String> groupings = Arrays.asList(histogramGroupings.split(","));
query.getGrouping().addAll(groupings.stream().map(Variable::new).collect(Collectors.toList()));
query.setAlgorithm(new Algorithm("histograms", "Histograms", false));
......
......@@ -27,6 +27,8 @@ public class MiningQuery {
this.variables = variables;
}
public void addVariable(Variable variable) { this.variables.add(variable); }
public List<Variable> getCovariables() {
return covariables;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment