[EnterpriseDB Logo] Postgres Plus Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
Are bitwise operations supported?  XML
Forum Index » GridSQL - General
Author Message
A_C_7

New member

Joined: 09/01/2010 21:50:02
Messages: 5
Offline

I'm trying to execute 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)


Server: Postgres 8.4
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

Please advice.

Thank you,
Anton

This message was edited 1 time. Last update was at 05/02/2010 16:14:55

Mason_S

Senior member

Joined: 01/04/2008 09:03:08
Messages: 342
Offline

This does appear to be a problem. We will look into the level of effort for fixing this.

Thanks,

Mason
[WWW]
 
Forum Index » GridSQL - General
Go to:   
Powered by JForum 2.1.8 © JForum Team