bugs fixed in showcreatetable and samplings operations. In these operation it is useful to insert the table name in a query as "schema.table" for postgres and "db.table" for mysql. Class GettableDetails modified to provide the schema or db name in input to the rows computation
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManagerAlgorithms@98908 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
25b6e891ec
commit
4bb57230d7
|
@ -456,8 +456,27 @@ public class GetTableDetails extends StandardLocalExternalAlgorithm {
|
|||
|
||||
// recover the number of rows
|
||||
// BigInteger rows = mgt.getNumberOfRows(tableName);
|
||||
|
||||
long rows = 0;
|
||||
|
||||
if ((driverInfo.toLowerCase().contains("postgres"))) {
|
||||
AnalysisLogger.getLogger().debug(
|
||||
"In GetTableDetails->*schemaName:" + schemaName);;
|
||||
|
||||
long rows = mgt.getNumberOfRows(tableName);
|
||||
rows = mgt.getNumberOfRows(tableName, schemaName);
|
||||
|
||||
}
|
||||
|
||||
if ((driverInfo.toLowerCase().contains("mysql"))) {
|
||||
|
||||
AnalysisLogger.getLogger().debug(
|
||||
"In GetTableDetails->*databasename:" + databaseName);;
|
||||
|
||||
rows = mgt.getNumberOfRows(tableName, databaseName);
|
||||
|
||||
}
|
||||
|
||||
// long rows = mgt.getNumberOfRows(tableName);
|
||||
|
||||
// PrimitiveType valRows = new PrimitiveType(
|
||||
// String.class.getName(), rows.toString(),
|
||||
|
|
Loading…
Reference in New Issue