[ 
https://issues.apache.org/jira/browse/IOTDB-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuan Tian reassigned IOTDB-921:
-------------------------------

    Assignee: Yuan Tian

> The query result set of JDBC will be covered by next query
> ----------------------------------------------------------
>
>                 Key: IOTDB-921
>                 URL: https://issues.apache.org/jira/browse/IOTDB-921
>             Project: Apache IoTDB
>          Issue Type: Bug
>            Reporter: XiangweiWei
>            Assignee: Yuan Tian
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2020-09-27-21-23-32-742.png
>
>
> {code:java}
> public static void main(String[] args) throws ClassNotFoundException, 
> SQLException {
>  Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
>  try (Connection connection = 
> DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root");
>  Statement statement = connection.createStatement()) {
>  try {
>  statement.execute("SET STORAGE GROUP TO root.sg1");
>  statement.execute("CREATE TIMESERIES root.sg1.d0.s0 WITH DATATYPE=INT64, 
> ENCODING=RLE, COMPRESSOR=SNAPPY");
>  statement.execute("CREATE TIMESERIES root.sg1.d0.s1 WITH DATATYPE=INT64, 
> ENCODING=RLE, COMPRESSOR=SNAPPY");
>  statement.execute("CREATE TIMESERIES root.sg1.d1.s0 WITH DATATYPE=INT64, 
> ENCODING=RLE, COMPRESSOR=SNAPPY");
>  statement.execute("CREATE TIMESERIES root.sg1.d1.s1 WITH DATATYPE=INT64, 
> ENCODING=RLE, COMPRESSOR=SNAPPY");
>  } catch (IoTDBSQLException e) {
>  System.out.println(e.getMessage());
>  }
>  statement.execute("insert into root.sg1.d0(timestamp,s0,s1) values(1,1,1)");
>  statement.execute("insert into root.sg1.d1(timestamp,s0,s1) 
> values(1000,1000,1000)");
>  List<ResultSet> resultSetList = new ArrayList<>();
>  resultSetList.add(statement.executeQuery("select * from root.sg1.d0 where 
> time <= 1"));
>  resultSetList.add(statement.executeQuery("select * from root.sg1.d1 where s0 
> >= 100"));
>  for (ResultSet resultSet : resultSetList) {
>  outputResult(resultSet);
>  }
>  } catch (IoTDBSQLException e){
>  System.out.println(e.getMessage());
>  }
> }
> {code}
>  
> The result will be like:
>  
> !image-2020-09-27-21-23-32-742.png!
>  
> Obviously, the result of `d0` is covered by `d1`!!! It does not have the 
> timestamp 1000 at all.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to