alibaba / wasp

megastore-like system
http://alibaba.github.io/wasp/
Apache License 2.0
189 stars 80 forks source link

where clause only support equal condition? #8

Open colorant opened 11 years ago

colorant commented 11 years ago

say with following query in wasp shell

query "select * from user where user_id=1" works +----------+-----------+ | user_id | name | +----------+-----------+ | 1 | binlijin | +----------+-----------+

while query "select * from user where user_id>0"

ERROR: java.sql.SQLException: org.apache.wasp.jdbc.JdbcException: Operate a not supported sql: "Don't get a Index!" [90170-1]

jaywong85 commented 11 years ago

nope. wasp support range condition. but only in index query. it means we must create a index. such as (user_name and age) then we can : query "select * from user where user_name='abc' and age > 20"

colorant commented 11 years ago

ok i c, though this still seem strange to me, user_id is a primary key, still need index's help...?

colorant commented 11 years ago

And , then if I run

wasp(main):072:0> query "select * from user where name='binlijin'"

ERROR: java.sql.SQLException: org.apache.wasp.jdbc.JdbcException: Operate a not supported sql: "Don't get a Index!" [90170-1]

This is what the following wiki want to explained? :

1 当前版本支持构建索引的查询,即,没有构建索引的查询在本版本中尚不支持.

jaywong85 commented 11 years ago

yep. 2 implementation in our design. so. primary key not similar with index

colorant commented 11 years ago

I see that primary key is part of hbase row-key, and this should also be sort able

I can not even create index for PK, then range scan on PK filed is not possilbe?

jaywong85 commented 11 years ago

as U say. it is possible, but at the moment wasp not support. may be supported later.

thx for your report