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

fix number of sampling point

parent 7923b47b
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ public class DataUtil { ...@@ -30,7 +30,7 @@ public class DataUtil {
for (String var : vars) { for (String var : vars) {
JsonArray currentVarData = new JsonArray(); JsonArray currentVarData = new JsonArray();
int samplingPercentage = (int) countAdniRows()/NB_ROWS_SAMPLING; int samplingPercentage = 100 * NB_ROWS_SAMPLING / (int) countAdniRows();
List<Object> queryResult = jdbcTemplate.queryForList( List<Object> queryResult = jdbcTemplate.queryForList(
"SELECT " + var + " FROM adni_merge " + "SELECT " + var + " FROM adni_merge " +
"TABLESAMPLE SYSTEM ("+ samplingPercentage +") REPEATABLE ( "+ TABLESAMPLE_SEED +" )", Object.class); "TABLESAMPLE SYSTEM ("+ samplingPercentage +") REPEATABLE ( "+ TABLESAMPLE_SEED +" )", Object.class);
......
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