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:
parent
ab97ee8304
commit
f790f715b7
|
@ -97,7 +97,7 @@ public class Sampler {
|
||||||
if (DBType.equals(POSTGRES)) {
|
if (DBType.equals(POSTGRES)) {
|
||||||
|
|
||||||
//the full name equal to "schemaname.tablename"
|
//the full name equal to "schemaname.tablename"
|
||||||
tableName=schemaName+"."+tableName;
|
tableName=schemaName+"."+"\""+tableName+"\"";
|
||||||
|
|
||||||
querySampleOnTable = String.format(queryForSampleOnTablePostgres,
|
querySampleOnTable = String.format(queryForSampleOnTablePostgres,
|
||||||
listAttributes, tableName);
|
listAttributes, tableName);
|
||||||
|
@ -510,7 +510,8 @@ public class Sampler {
|
||||||
if (DBType.equals(POSTGRES)) {
|
if (DBType.equals(POSTGRES)) {
|
||||||
|
|
||||||
//the full name equal to "schemaname.tablename"
|
//the full name equal to "schemaname.tablename"
|
||||||
tablename=schemaName+"."+tablename;
|
tablename=schemaName+"."+ "\""+tablename+"\"";
|
||||||
|
|
||||||
|
|
||||||
query = String.format(queryForSmartSampleOnTablePostgres,
|
query = String.format(queryForSmartSampleOnTablePostgres,
|
||||||
listAttributes, tablename);
|
listAttributes, tablename);
|
||||||
|
@ -903,7 +904,8 @@ public class Sampler {
|
||||||
if (DBType.equals(POSTGRES)) {
|
if (DBType.equals(POSTGRES)) {
|
||||||
|
|
||||||
//the full name equal to "schemaname.tablename"
|
//the full name equal to "schemaname.tablename"
|
||||||
tablename=schemaName+"."+tablename;
|
tablename=schemaName+"."+ "\""+tablename+"\"";
|
||||||
|
|
||||||
|
|
||||||
query = String.format(
|
query = String.format(
|
||||||
queryForSmartSampleWithThresholdOnTablePostgres,
|
queryForSmartSampleWithThresholdOnTablePostgres,
|
||||||
|
@ -1224,7 +1226,7 @@ public class Sampler {
|
||||||
if ((NumRows <= 700000) && (DBType.equals(POSTGRES))) { // Postgres
|
if ((NumRows <= 700000) && (DBType.equals(POSTGRES))) { // Postgres
|
||||||
|
|
||||||
//the full name equal to "schemaname.tablename"
|
//the full name equal to "schemaname.tablename"
|
||||||
tableName=schemaName+"."+tableName;
|
tableName=schemaName+"."+ "\""+tableName+"\"";
|
||||||
|
|
||||||
querySampleOnTable = String.format(
|
querySampleOnTable = String.format(
|
||||||
queryForRandomSampleOnTablePostgres, listAttributes,
|
queryForRandomSampleOnTablePostgres, listAttributes,
|
||||||
|
@ -1235,7 +1237,8 @@ public class Sampler {
|
||||||
if ((NumRows > 700000) && (DBType.equals(POSTGRES))) { // Postgres
|
if ((NumRows > 700000) && (DBType.equals(POSTGRES))) { // Postgres
|
||||||
|
|
||||||
//the full name equal to "schemaname.tablename"
|
//the full name equal to "schemaname.tablename"
|
||||||
tableName=schemaName+"."+tableName;
|
tableName=schemaName+"."+ "\""+tableName+"\"";
|
||||||
|
|
||||||
|
|
||||||
// generate an index randomly to execute the query
|
// generate an index randomly to execute the query
|
||||||
|
|
||||||
|
|
|
@ -960,9 +960,9 @@ public class DatabaseManagement {
|
||||||
// RowString);
|
// RowString);
|
||||||
|
|
||||||
// check value row
|
// check value row
|
||||||
// AnalysisLogger.getLogger().debug(
|
// AnalysisLogger.getLogger().debug(
|
||||||
// "writing the value: " + RowString + " key: "
|
// "writing the value: " + RowString + " key: "
|
||||||
// + String.valueOf(i));
|
// + String.valueOf(i));
|
||||||
|
|
||||||
// mapResult.put(Integer.valueOf(i), RowString);
|
// mapResult.put(Integer.valueOf(i), RowString);
|
||||||
mapResult.put(String.valueOf(i), RowString);
|
mapResult.put(String.valueOf(i), RowString);
|
||||||
|
|
Loading…
Reference in New Issue