Re: [DISCUSS] Restructure QueryPlan: RawDataQueryPlan and AlignByDevicePlan

2020-02-12 Thread Jialin Qiao
Hi,

The new construction of QueryPlan looks much better. 
There are two things left:

(1) change the sql of group by device to align by device
(2) optimize the PhysicalGenerator

Thanks,
--
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院

> -原始邮件-
> 发件人: "魏祥威" <526213...@qq.com>
> 发送时间: 2020-02-12 15:20:36 (星期三)
> 收件人: dev 
> 抄送: 
> 主题: [DISCUSS] Restructure QueryPlan: RawDataQueryPlan and AlignByDevicePlan
> 
> Hi all,
> 
> 
> I'm currently fixing this issue: Seperate AlignByDevicePlan from QueryPlan[1].
> 
> 
> There are three aspects that I changed:
> 
> 
> (1) Restructure QueryPlan
> 
> 
> The general query aligning by time and the AlignByDevice query ( which is 
> called groupByDevice before ) were both storaged in QueryPlan before. As they 
> store different parameters and invoke different query process, I seperated 
> them from QueryPlan. QueryPlan is as base class now, the RawDataQueryPlan and 
> AlignByDevicePlan representing two types of queries are as subclasses of 
> QueryPlan.
> 
> 
> (2) The query process of an AlignByDevicePlan
> 
> 
> There were three subclasses of QueryPlan before: GroupByPlan, FillQueryPlan, 
> AggregationPlan. They are as subclasses of RawDataQueryPlan now. To avoid 
> redundance, I didn't design the same subclasses for AlignByDevicePlan, 
> instead these three sub-plan are storaged as parameters in it. For example, 
> if a query are both a AlignByDevicePlan and a GroupByPlan, the GroupByPlan 
> parameter will be assigned and processed later.
> 
> 
> (3) The name of AlignByDevicePlan
> 
> 
> Maybe you have noticed that. Because GroupByDevice is not a standard sql 
> statement, so I rename it as AlignByDevice.
> 
> 
> Thanks for the advice of Xiangdong Huang for this change. I also changed some 
> names which used GroupByDevice, but it was just a part. Hope we can change it 
> little by little later.
> 
> 
> [1]https://issues.apache.org/jira/browse/IOTDB-468
> 
> 
> 
> Best,
> Xiangwei Wei
> 
> 
> 
> 


[DISCUSS] Restructure QueryPlan: RawDataQueryPlan and AlignByDevicePlan

2020-02-11 Thread ??????
Hi all,


I'm currently fixing this issue: Seperate AlignByDevicePlan from QueryPlan[1].


There are three aspects that I changed:


(1) Restructure QueryPlan


The general query aligning by time and the AlignByDevice query ( which is 
called groupByDevice before ) were both storaged in QueryPlan before. As they 
store different parameters and invoke different query process, I seperated them 
from QueryPlan. QueryPlan is as base class now, the RawDataQueryPlan and 
AlignByDevicePlan representing two types of queries are as subclasses of 
QueryPlan.


(2) The query process of an AlignByDevicePlan


There were three subclasses of QueryPlan before: GroupByPlan, FillQueryPlan, 
AggregationPlan. They are as subclasses of RawDataQueryPlan now. To avoid 
redundance, I didn't design the same subclasses for AlignByDevicePlan, instead 
these three sub-plan are storaged as parameters in it. For example, if a query 
are both a AlignByDevicePlan and a GroupByPlan, the GroupByPlan parameter will 
be assigned and processed later.


(3) The name of AlignByDevicePlan


Maybe you have noticed that. Because GroupByDevice is not a standard sql 
statement, so I rename it as AlignByDevice.


Thanks for the advice of Xiangdong Huang for this change. I also changed some 
names which used GroupByDevice, but it was just a part. Hope we can change it 
little by little later.


[1]https://issues.apache.org/jira/browse/IOTDB-468



Best,
Xiangwei Wei