{"issue":{"milestone":null,"title":"[FRG-65] NULLIF with a parameter count other than 2 causes assertion failure","created_at":"2011-12-30T03:49:55Z","user":{"login":"dynamobi-build","id":1123017,"url":"https://api.github.com/users/dynamobi-build","avatar_url":"https://secure.gravatar.com/avatar/cb215b3d786be20761071a562a56af64?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cb215b3d786be20761071a562a56af64"},"labels":[{"name":"FRG","url":"https://api.github.com/repos/dynamobi/dynamobi/labels/FRG","color":"1f8f0d"},{"name":"SQL Validator","url":"https://api.github.com/repos/dynamobi/dynamobi/labels/SQL+Validator","color":"19b54d"}],"updated_at":"2011-12-30T03:49:55Z","state":"open","id":2686363,"closed_at":null,"html_url":"https://github.com/dynamobi/dynamobi/issues/805","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"<b><i>[reporter=\"jvs\", created=\"Wed, 8 Mar 2006 19:26:03 -0500 (GMT-05:00)\"]</i></b>\nShould be a validation error instead (NULLIF takes exactly two parameters).<br/>\n<br/>\n0: jdbc:farrago:> select nullif() from sales.depts;<br/>\nError: java.lang.AssertionError: Internal error: Invalid arg count: NULLIF() (state=,code=0)<br/>\nnet.sf.farrago.util.FarragoUtil$FarragoSqlException: java.lang.AssertionError: Internal error: Invalid arg count: NULLIF()<br/>\n        at org.eigenbase.util.Util.newInternal(Util.java:820)<br/>\n        at org.eigenbase.sql.fun.SqlNullifFunction.rewriteCall(SqlNullifFunction.java:50)<br/>\n        at org.eigenbase.sql.validate.SqlValidatorImpl.performUnconditionalRewrites(SqlValidatorImpl.java:622)<br/>\n        at org.eigenbase.sql.validate.SqlValidatorImpl.performUnconditionalRewrites(SqlValidatorImpl.java:627)<br/>\n        at org.eigenbase.sql.validate.SqlValidatorImpl.performUnconditionalRewrites(SqlValidatorImpl.java:599)<br/>\n        at org.eigenbase.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:440)<br/>\n        at org.eigenbase.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:273)<br/>\n        at net.sf.farrago.query.FarragoSqlValidator.validate(FarragoSqlValidator.java:62)<br/>\n        at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:608)<br/>\n        at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:544)<br/>\n        at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:777)<br/>\n        at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:728)<br/>\n        at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:156)<br/>\n        at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:104)<br/>\n        at sqlline.SqlLine$Commands.execute(Unknown Source)<br/>\n        at sqlline.SqlLine$Commands.sql(Unknown Source)<br/>\n        at sqlline.SqlLine.dispatch(Unknown Source)<br/>\n        at sqlline.SqlLine.begin(Unknown Source)<br/>\n        at sqlline.SqlLine.mainWithInputRedirection(Unknown Source)<br/>\n        at sqlline.SqlLine.main(Unknown Source)<br/>\n0","number":805,"url":"https://api.github.com/repos/dynamobi/dynamobi/issues/805","comments":0,"assignee":null},"action":"opened"}