| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 9 Feb 2010 00:26:37
|
A_C_7
New member
Joined: 9 Jan 2010 21:50:02
Messages: 5
Offline
|
I'm trying to execute this rather simple SELECT statement:
SELECT a FROM "Category" t0 WHERE t0.a & b'101' = b'101' LIMIT 10
where "a" is a field type BIT, which according to GridSQL SQL Reference is supported.
I keep getting the following error:
[severe] java.sql.SQLException: ERROR: Cannot Determine The Expression For (EXPRESSION)("t0"."a" & b'101')
at com.edb.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2306)
at com.edb.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1931)
at com.edb.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:643)
at com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:476)
at com.edb.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:390)
at com.edb.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:340)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.edb.ds.common.PooledConnectionImpl$StatementHandler.invoke(PooledConnectionImpl.java:414)
at $Proxy1.execute(Unknown Source)
GridSQL build: 1.1b
Excerpt from console.log:
com.edb.gridsql.parser.core.ParseException: Cannot Determine The Expression For (EXPRESSION)("t0"."a" & b'101')
at com.edb.gridsql.parser.Parser.parse(Unknown Source)
at com.edb.gridsql.parser.Parser.parseStatement(Unknown Source)
at com.edb.gridsql.protocol.RequestAnalyzer.getExecutableRequest(Unknown Source)
at com.edb.gridsql.protocol.PgProtocolSession.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Oddly enough, if left part of the expression explicitly casted, the statement goes through:
SELECT a FROM "Category" t0 WHERE t0.a::int & 5 = 5 LIMIT 10
Unfortunately this workaround wouldn't work for me, because BIT field length is 1000 in my case
Please advice.
Thank you,
Anton
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Feb 2010 12:21:14
|
Mason_S
Senior member
Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline
|
This should be fixed with this commit:
http://forums.enterprisedb.com/posts/list/2168.page
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Feb 2010 14:28:22
|
A_C_7
New member
Joined: 9 Jan 2010 21:50:02
Messages: 5
Offline
|
We fixed it internally already, but thank you very much -- I'm sure other people will appreciate your efforts as well
Regards,
Anton
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Feb 2010 14:31:45
|
Mason_S
Senior member
Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline
|
OK, thanks.
If you discover any other bugs and also fix them, please feel free to share your changes.
Thanks,
Mason
|
|
|
 |
|
|