bug fixed in Sampler and DatabaseOPerations classes to manage tables case sensitive for database Postgres

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@99145 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-07-31 09:02:47 +00:00
parent ab97ee8304
commit f790f715b7
2 changed files with 11 additions and 8 deletions

View File

@ -97,7 +97,7 @@ public class Sampler {
if (DBType.equals(POSTGRES)) {
//the full name equal to "schemaname.tablename"
tableName=schemaName+"."+tableName;
tableName=schemaName+"."+"\""+tableName+"\"";
querySampleOnTable = String.format(queryForSampleOnTablePostgres,
listAttributes, tableName);
@ -510,7 +510,8 @@ public class Sampler {
if (DBType.equals(POSTGRES)) {
//the full name equal to "schemaname.tablename"
tablename=schemaName+"."+tablename;
tablename=schemaName+"."+ "\""+tablename+"\"";
query = String.format(queryForSmartSampleOnTablePostgres,
listAttributes, tablename);
@ -903,7 +904,8 @@ public class Sampler {
if (DBType.equals(POSTGRES)) {
//the full name equal to "schemaname.tablename"
tablename=schemaName+"."+tablename;
tablename=schemaName+"."+ "\""+tablename+"\"";
query = String.format(
queryForSmartSampleWithThresholdOnTablePostgres,
@ -1224,7 +1226,7 @@ public class Sampler {
if ((NumRows <= 700000) && (DBType.equals(POSTGRES))) { // Postgres
//the full name equal to "schemaname.tablename"
tableName=schemaName+"."+tableName;
tableName=schemaName+"."+ "\""+tableName+"\"";
querySampleOnTable = String.format(
queryForRandomSampleOnTablePostgres, listAttributes,
@ -1235,7 +1237,8 @@ public class Sampler {
if ((NumRows > 700000) && (DBType.equals(POSTGRES))) { // Postgres
//the full name equal to "schemaname.tablename"
tableName=schemaName+"."+tableName;
tableName=schemaName+"."+ "\""+tableName+"\"";
// generate an index randomly to execute the query

View File

@ -960,9 +960,9 @@ public class DatabaseManagement {
// RowString);
// check value row
// AnalysisLogger.getLogger().debug(
// "writing the value: " + RowString + " key: "
// + String.valueOf(i));
// AnalysisLogger.getLogger().debug(
// "writing the value: " + RowString + " key: "
// + String.valueOf(i));
// mapResult.put(Integer.valueOf(i), RowString);
mapResult.put(String.valueOf(i), RowString);