When the server restart, the client cannot find the connection error

2019-11-11 Thread
Hi,
I will fix this bug , i will refer to the *executeQuery()* method of 
reconnection for repair.


Pr :https://github.com/apache/incubator-iotdb/pull/543 
<https://github.com/apache/incubator-iotdb/pull/543>

> 在 2019年11月11日,下午5:42,刘大伟 (Jira) mailto:j...@apache.org>> 写道:
> 
> 刘大伟 created IOTDB-300:
> -
> 
> Summary: When the server restart, the client cannot find the 
> connection error
> Key: IOTDB-300
> URL: https://issues.apache.org/jira/browse/IOTDB-300 
> <https://issues.apache.org/jira/browse/IOTDB-300>
> Project: Apache IoTDB
>  Issue Type: Bug
>Reporter: 刘大伟
> 
> 
> 1. Start the IOTDB-Client and connect to the server successfully
> 
> 2. Restart the server side
> 
> 3. And then if you execute any command on the client, you will receive an 
> error message: 'MSG: cannot get ID for statement'
> 
>  
> 
> 
> This problem occurs after the [iotdb-291] merge, because a *requeststmtid()* 
> method is added before executing the SQL statement, but this method is not 
> the same as the previous *executeQuery()* method: when an error is returned, 
> re-establish a connection and try again.
> 
>  
> 
> I will refer to the *executeQuery()* method of reconnection for repair. Of 
> course, I think the best way is to have the client constantly check the 
> connection. What do you think, friends?
> 
> 
> 
> --
> This message was sent by Atlassian Jira
> (v8.3.4#803005)
> 



[jira] [Created] (IOTDB-305) a sql to query a group of devices separately

2019-11-14 Thread
Hi ,teacher qiao,
I think there's a little bit of ambiguity here , ‘root.ChangSha’ is a group, 
but it was also involved in the naming of another device !
Or we don't allow TIMESERIES to be created directly under storage groups. 
because, I think the introduction of  "Table" ,the data will be confusing.

example:

+---++—+
  Timedevice
 speed
+---++—+
1970-01-01T08:00:00.001+08:00 |   root.北京 | 1
+---++—+
1970-01-01T08:00:00.001+08:00 |   root.北京.西城区 | 1
+---++—+
1970-01-01T08:00:00.001+08:00 |   root.北京.西城区.老张的车 |1
+---++—+


> 在 2019年11月14日,下午5:28,Jialin Qiao  写道:
> 
> Hi,
> 
> The path from root to the last but one is device, which is like a table in 
> relational databases.
> 
>> CREATE TIMESERIES root.ChangSha.A.aa WITH DATATYPE=INT64, ENCODING=RLE;
> 
> In this case, root.ChangSha.A is device.
> 
>> CREATE TIMESERIES root.ChangSha.aa WITH DATATYPE=INT64, ENCODING=RLE;
> 
> In this case, root.ChangSha is a device. 
> 
> Usually, we do not create a device under another device, which is weired.
> 
> Thanks,
> --
> Jialin Qiao
> School of Software, Tsinghua University
> 
> 乔嘉林
> 清华大学 软件学院
> 
>> -原始邮件-
>> 发件人: "刘大伟" <13965...@qq.com>
>> 发送时间: 2019-11-14 14:18:42 (星期四)
>> 收件人: dev@iotdb.apache.org
>> 抄送: 
>> 主题: [jira] [Created] (IOTDB-305) a sql to query a group of devices separately
>> 
>> Hi,
>> 
>> I have a question,
>> 
>> SET STORAGE GROUP TO root.ChangSha;
>> CREATE TIMESERIES root.ChangSha.A.aa WITH DATATYPE=INT64, ENCODING=RLE;
>> CREATE TIMESERIES root.ChangSha.aa WITH DATATYPE=INT64, ENCODING=RLE;
>> 
>> 
>> insert into root.ChangSha.A(timestamp,aa) values(1,1);
>> insert into root.ChangSha(timestamp,aa) values(1,1);
>> 
>> 
>> 
>> Select * from root.ChangSha where aa = 1
>> 
>> Result will print :
>> 
>> +---++--+
>> |   Time |root.ChangSha.A.aa|
>> root.ChangSha.aa|
>> +---++--+
>> |  1970-01-01T08:00:00.001+08:00| 1  |   
>> 1|
>> |  1970-01-01T08:00:00.002+08:00|  null  |   
>> 1|
>> +---++—+
>> 
>> Which field is device  and how to group by ?
>> 
>> 
>>> 在 2019年11月14日,下午12:21,Jialin Qiao  写道:
>>> 
>>> Hi,
>>> 
>>>> "group by device" sql can't satisfy this demand. It is because the where 
>>>> condition of "group by device" is shared by all devices.
>>> 
>>> The "shared by all devices" is a little hard to comprehend.  Many users are 
>>> from relational databases.
>>> In relational databases, when querying a table, predicates are applied to 
>>> each row. 
>>> By default, IoTDB adopts table format: "time, series1, series2, ..., 
>>> seriesN".
>>> 
>>> For this scenario, what users really want is querying on a narrow table : 
>>> "time, device, sensor1, sensor2, ..., sensor3". 
>>> Maybe we need to introduce the concept of "Table", and enable users to 
>>> choose which table that want to use by a "group by device" clause.
>>> 
>>> Thanks,
>>> --
>>> Jialin Qiao
>>> School of Software, Tsinghua University
>>> 
>>> 乔嘉林
>>> 清华大学 软件学院
>>> 
>>>> -原始邮件-
>>>> 发件人: "Lei Rui (Jira)" 
>>>> 发送时间: 2019-11-14 11:19:00 (星期四)
>>>> 收件人: dev@iotdb.apache.org
>>>> 抄送: 
>>>> 主题: [jira] [Created] (IOTDB-305) a sql to query a group of devices 
>>>> separately
>>>> 
>>>> Lei Rui created IOTDB-305:
>>>> -
>>>> 
>>>>   Summary: a sql to query a group of devices separately
>>>>

Re: Solving jira problem (IOTDB-298) Refactor the "last" and "first" aggregators

2019-12-03 Thread
Hi,
I'm terribly sorry to bother you,  is this the same problem as 
IOTDB-335(https://issues.apache.org/jira/browse/IOTDB-335 
)?



> 在 2019年12月3日,下午3:37,thss15_yit  写道:
> 
> Hi,
> Now I'm trying to design and develop a new 'last' function to get the 
> last time-value pairs in one or several timeseries, working on JIRA issue 
> [IOTDB-298], Now an example of this function is SELECT LAST(d0.s1, d1.s2) 
> FROM root.sg1 , to get the last value in root.sg1.d0.s1 and root.sg1.d1.s2
> You can see the function's particular grammar and examples in the 
> attached file last.md .
> I'm glad to get your suggestions. Thank you.
> Tao Yi
> 
> 
> 
> 
> 
> At 2019-11-29 11:30:18, "thss15_yit"  wrote:
> >Hi,
> >I have been working on JIRA issue [IOTDB-298], and now in the following 
> > pull request I change the aggregation function's name from first,last to 
> > first_value,last_value to make it more clear, and change the relevant 
> > documents. 
> >The pull request is https://github.com/apache/incubator-iotdb/pull/594, 
> >Thanks for your checking.
> >I'm going to complete a new 'last' function to get the last point(s) on 
> > this issue. The function still needs to be discussed. Thanks for your idea.
> >Tao Yi 
> >
> >
> >
> >
> > 
> 
> 
>  



[IOTDB-311] Generate anything in test to the target directory

2019-11-27 Thread
Hi all,

I’m working on this issue.

So far, I've modified all of the test-generated files into the target 
directory, and added the TestConstant class for each project test, so that 
anyone who writes unit tests later can use it uniformly to manage the 
parameters in the test.

In addition, when I checked the server unit tests, I found that the indexDir 
field in the configuration file was nowhere to be used, but the test directory 
was generated all the time. 
So I think it's worth removing it from the configuration file and from the unit 
tests.

I have submitted this pr, I hope someone can review it for me.

Pr:
https://github.com/apache/incubator-iotdb/pull/578 


Issue:

https://issues.apache.org/jira/browse/IOTDB-311 



> 在 2019年11月21日,下午7:02,Jialin Qiao (Jira)  写道:
> 
> Jialin Qiao created IOTDB-311:
> -
> 
> Summary: Generate anything in test to the target directory.
> Key: IOTDB-311
> URL: https://issues.apache.org/jira/browse/IOTDB-311
> Project: Apache IoTDB
>  Issue Type: Improvement
>Reporter: Jialin Qiao
> 
> 
> We'd better generate anything in UT/IT to the target directory to avoid 
> including these files in source release.
> 
> 
> 
> --
> This message was sent by Atlassian Jira
> (v8.3.4#803005)
>