Yuan Tian created IOTDB-347:
-------------------------------
Summary: Bug in limit clause
Key: IOTDB-347
URL: https://issues.apache.org/jira/browse/IOTDB-347
Project: Apache IoTDB
Issue Type: Bug
Reporter: Yuan Tian
The test function `testQuery` in `IoTDBQueryResultSetTest.java` construct data
as following
{code:java}
Object[][] input = {
{2L, 2.22F, 40000L, null,},
{3L, 3.33F, null, null,},
{4L, 4.44F, null, null,},
{50L, null, 50000L, null,},
{100L, null, 199L, null,},
{101L, null, 199L, null,},
{103L, null, 199L, null,},
{105L, 11.11F, 199L, 33333,},
{1000L, 1000.11F, 55555L, 22222,}};
{code}
and query sql is
{code:java}
String testSql = "select *,s1,s0,s2 from root.vehicle.d0 where s1 > 190 or s2 <
10.0 "
+ "limit 20 offset 1 slimit 4 soffset 2";
{code}
with the offset 1, we should skip the `\{2L, 2.22F, 40000L, null,}`, but the
expected answer doesn't do that:
{code:java}
String standard =
"Time,root.vehicle.d0.s2,root.vehicle.d0.s1,root.vehicle.d0.s0,root.vehicle.d0.s2,\n"
+ "2,2.22,40000,null,2.22,\n"
+ "3,3.33,null,null,3.33,\n"
+ "4,4.44,null,null,4.44,\n"
+ "50,null,50000,null,null,\n"
+ "100,null,199,null,null,\n"
+ "101,null,199,null,null,\n"
+ "103,null,199,null,null,\n"
+ "105,11.11,199,33333,11.11,\n"
+ "1000,1000.11,55555,22222,1000.11,\n";
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)