{"issue":{"milestone":null,"title":"[FRG-199] having clause column always needs to be qualified with tablename","created_at":"2011-12-30T03:42:31Z","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":"Sql2Rel","url":"https://api.github.com/repos/dynamobi/dynamobi/labels/Sql2Rel","color":"05e5d7"}],"updated_at":"2011-12-30T03:42:35Z","state":"closed","id":2686205,"closed_at":"2011-12-30T03:42:32Z","html_url":"https://github.com/dynamobi/dynamobi/issues/673","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"<b><i>[reporter=\"schoi\", created=\"Mon, 11 Sep 2006 17:58:23 -0500 (GMT-05:00)\"]</i></b>\nrepro:<br/>\n----------<br/>\ncreate schema s;<br/>\nset schema 's';<br/>\n<br/>\ncreate table qrysrcnum (<br/>\nn1 numeric (2, 0) primary key,<br/>\nn2 numeric (5, 2));<br/>\n<br/>\ninsert into qrysrcnum values ( 5, 20.00 );<br/>\ninsert into qrysrcnum values ( 7, 10.00 );<br/>\n<br/>\n-- doesn't work<br/>\nSELECT  n1, n2<br/>\nFROM  qrysrcnum  <br/>\nGROUP BY n1, n2<br/>\nHAVING n1 > 5;<br/>\n<br/>\nError: java.lang.AssertionError: Internal error: Identifier 'N1' is not a group expr (state=,code=0)<br/>\nnet.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: java.lang.AssertionError: Internal error: Identifier 'N1' is not a group expr<br/>\n        at org.eigenbase.util.Util.newInternal(Util.java:785)<br/>\n        at org.eigenbase.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:1907)<br/>\n        at org.eigenbase.sql2rel.SqlToRelConverter.access$900(SqlToRelConverter.java:58)<br/>\n        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:2714)<br/>\n        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:2294)<br/>\n        at org.eigenbase.sql.SqlIdentifier.accept(SqlIdentifier.java:349)<br/>\n        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:2638)<br/>\n        at org.eigenbase.sql2rel.StandardConvertletTable.convertExpressionList(StandardConvertletTable.java:737)<br/>\n        at org.eigenbase.sql2rel.StandardConvertletTable.convertCall(StandardConvertletTable.java:726)<br/>\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>\n        at java.lang.reflect.Method.invoke(Method.java:585)<br/>\n<br/>\n<br/>\n-- works<br/>\nSELECT  n1, n2<br/>\nFROM  qrysrcnum  <br/>\nGROUP BY n1, n2<br/>\nHAVING qrysrcnum.n1 > 5;<br/>\n<br/>\n+-----+--------+<br/>\n| N1  |   N2   |<br/>\n+-----+--------+<br/>\n| 7   | 10.00  |<br/>\n+-----+--------+<br/>\n","number":673,"url":"https://api.github.com/repos/dynamobi/dynamobi/issues/673","comments":3,"assignee":null},"comment":{"created_at":"2011-12-30T03:42:35Z","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"},"updated_at":"2011-12-30T03:42:35Z","id":3310246,"body":"<b><i>[author=\"rchen\", created=\"Tue, 24 Oct 2006 10:49:19 -0500 (GMT-05:00)\"]</i></b>\nNeed to qualify column references. Fixed in eigenbase change list 7982. ","url":"https://api.github.com/repos/dynamobi/dynamobi/issues/comments/3310246"},"action":"created"}