bridgedb / BridgeDb

The BridgeDb Library source code
https://bridgedb.org/
Apache License 2.0
28 stars 21 forks source link

QC fails when comparing a schema 3 with a schema 4 database #220

Closed egonw closed 1 year ago

egonw commented 1 year ago

It gives this stacktrace:

Exception in thread "main" java.sql.SQLSyntaxErrorException: Column 'ISPRIMARY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'ISPRIMARY' is not a column in the target table.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2405)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:88)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:149)
        at org.bridgedb.tools.qc.BridgeQC.summarizeOverallStats(BridgeQC.java:395)
        at org.bridgedb.tools.qc.BridgeQC.run(BridgeQC.java:368)
        at org.bridgedb.tools.qc.BridgeQC.main(BridgeQC.java:468)
Caused by: ERROR 42X04: Column 'ISPRIMARY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'ISPRIMARY' is not a column in the target table.
        at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:300)
        at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:295)
        at org.apache.derby.impl.sql.compile.ColumnReference.bindExpression(ColumnReference.java:412)
        at org.apache.derby.impl.sql.compile.ColumnReference.bindExpression(ColumnReference.java:43)
        at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java:759)
        at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java:839)
        at org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(SelectNode.java:575)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java:209)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java:130)
        at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(CursorNode.java:283)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
        at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
        ... 4 more

It does not happen when comparing a schema 3 or a schema 4 database with itself.

egonw commented 1 year ago

Fixed in https://github.com/bridgedb/BridgeDb/pull/223