Phoenix使用limit,offset语句

Phoenix使用offset时版本要4.8+
低版本不支持offset语句,会提示语法错误:Syntax error. Missing "EOF" at line 1

0: jdbc:phoenix:192.168.53.173:2181:/hbase> select * from TEST limit 10 ;
+-------+----------+
|  ID   |   NAME   |
+-------+----------+
| 0     | xubin    |
| 1     | xuwei    |
| 1000  | zsz1000  |
| 1001  | zsz1001  |
| 1002  | zsz1002  |
| 1003  | zsz1003  |
| 1004  | zsz1004  |
| 1005  | zsz1005  |
| 1006  | zsz1006  |
| 1007  | zsz1007  |
+-------+----------+
10 rows selected (0.028 seconds)
0: jdbc:phoenix:192.168.53.173:2181:/hbase> select * from TEST limit 10 offset 5;
Error: ERROR 602 (42P00): Syntax error. Missing "EOF" at line 1, column 29. (state=42P00,code=602)
org.apache.phoenix.exception.PhoenixParserException: ERROR 602 (42P00): Syntax error. Missing "EOF" at line 1, column 29.
        at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
        at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
        at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java
......
```

你可能感兴趣的:(Phoenix使用limit,offset语句)