You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by weizihan0110 <wz...@163.com> on 2021/03/04 03:13:05 UTC
[DISCUSS] How to use the wildcard * to match one or more layers of
nodes in the time series path?
Hi all:
The initial discussion is at https://issues.apache.org/jira/browse/IOTDB-1160)
First Solution:
"*" matches just one layer and "**" matches one or more layers. As a result, the SQL statement "select * from root" have to be converted into "select ** from root". It seems a little bit disappointing.
Second Solution:
"*" matches one or more layers by default. And we can put something like "1 layer"(layer is the keyword) in the SQL statement to strengthen the semantics to match just one layer. More, "2 layers" to match just two layers and so on. This solution can be more scalable, I think.
Does anyone have any idea about this? Welcome to discuss.
Re: [DISCUSS] How to use the wildcard * to match one or more
layers of nodes in the time series path?
Posted by 王超 <cc...@163.com>.
Hi,+1 for Zesong's idea.
Chao Wang
BONC, Ltd
ccgowork@163.com
On 3/8/2021 18:09,Xiangdong Huang<sa...@gmail.com> wrote:
Hi, +1.
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University
黄向东
清华大学 软件学院
孙泽嵩 <sz...@mails.tsinghua.edu.cn> 于2021年3月8日周一 下午5:48写道:
Hi Zihan,
I support the first solution, though “select ** from root” may be strange
: )
Besides, I’d like to append another case:
I looked up the usage of wildstar in Linux :
/tmp/* matches any file in /tmp. // Substitutes for any number of
characters, except /.
/tmp/** matches all files and directories underneath /tmp. // Substitutes
for any number of characters, including /.
So we should also consider that ** also contains zero layer.
For example, if we have some storage groups:
root.a.sg1
root.a.b.sg2
root.b.sg3
For "delete storage group root.a", we do not delete any sg.
For "delete storage group root.a.*" we delete root.a.sg1
For "delete storage group root.a.sg1.*" we do not delete any sg.
For "delete storage group root.a.**" we delete root.a.sg1, root.a.b.sg2
If we also have another storage group “root.a”:
For "delete storage group root.a", we delete root.a
For "delete storage group root.a.*" we delete root.a.sg1 (because * does
not include zero layer)
For "delete storage group root.a.**" we delete root.a, root.a.sg1,
root.a.b.sg2 (because ** includes zero layer)
Best,
-----------------------------------
Zesong Sun
School of Software, Tsinghua University
孙泽嵩
清华大学 软件学院
2021年3月4日 11:13,weizihan0110 <wz...@163.com> 写道:
Hi all:
The initial discussion is at
https://issues.apache.org/jira/browse/IOTDB-1160)
First Solution:
"*" matches just one layer and "**" matches one or more layers. As a
result, the SQL statement "select * from root" have to be converted into
"select ** from root". It seems a little bit disappointing.
Second Solution:
"*" matches one or more layers by default. And we can put something like
"1 layer"(layer is the keyword) in the SQL statement to strengthen the
semantics to match just one layer. More, "2 layers" to match just two
layers and so on. This solution can be more scalable, I think.
Does anyone have any idea about this? Welcome to discuss.
Re: [DISCUSS] How to use the wildcard * to match one or more layers
of nodes in the time series path?
Posted by Xiangdong Huang <sa...@gmail.com>.
Hi, +1.
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University
黄向东
清华大学 软件学院
孙泽嵩 <sz...@mails.tsinghua.edu.cn> 于2021年3月8日周一 下午5:48写道:
> Hi Zihan,
>
> I support the first solution, though “select ** from root” may be strange
> : )
>
> Besides, I’d like to append another case:
>
> I looked up the usage of wildstar in Linux :
>
> /tmp/* matches any file in /tmp. // Substitutes for any number of
> characters, except /.
> /tmp/** matches all files and directories underneath /tmp. // Substitutes
> for any number of characters, including /.
>
> So we should also consider that ** also contains zero layer.
> For example, if we have some storage groups:
>
> root.a.sg1
> root.a.b.sg2
> root.b.sg3
>
> For "delete storage group root.a", we do not delete any sg.
> For "delete storage group root.a.*" we delete root.a.sg1
> For "delete storage group root.a.sg1.*" we do not delete any sg.
> For "delete storage group root.a.**" we delete root.a.sg1, root.a.b.sg2
>
> If we also have another storage group “root.a”:
>
> For "delete storage group root.a", we delete root.a
> For "delete storage group root.a.*" we delete root.a.sg1 (because * does
> not include zero layer)
> For "delete storage group root.a.**" we delete root.a, root.a.sg1,
> root.a.b.sg2 (because ** includes zero layer)
>
>
> Best,
> -----------------------------------
> Zesong Sun
> School of Software, Tsinghua University
>
> 孙泽嵩
> 清华大学 软件学院
>
> > 2021年3月4日 11:13,weizihan0110 <wz...@163.com> 写道:
> >
> > Hi all:
> > The initial discussion is at
> https://issues.apache.org/jira/browse/IOTDB-1160)
> >
> > First Solution:
> >
> > "*" matches just one layer and "**" matches one or more layers. As a
> result, the SQL statement "select * from root" have to be converted into
> "select ** from root". It seems a little bit disappointing.
> >
> > Second Solution:
> > "*" matches one or more layers by default. And we can put something like
> "1 layer"(layer is the keyword) in the SQL statement to strengthen the
> semantics to match just one layer. More, "2 layers" to match just two
> layers and so on. This solution can be more scalable, I think.
> >
> >
> > Does anyone have any idea about this? Welcome to discuss.
>
>
Re: [DISCUSS] How to use the wildcard * to match one or more layers
of nodes in the time series path?
Posted by 孙泽嵩 <sz...@mails.tsinghua.edu.cn>.
Hi Zihan,
I support the first solution, though “select ** from root” may be strange : )
Besides, I’d like to append another case:
I looked up the usage of wildstar in Linux :
/tmp/* matches any file in /tmp. // Substitutes for any number of characters, except /.
/tmp/** matches all files and directories underneath /tmp. // Substitutes for any number of characters, including /.
So we should also consider that ** also contains zero layer.
For example, if we have some storage groups:
root.a.sg1
root.a.b.sg2
root.b.sg3
For "delete storage group root.a", we do not delete any sg.
For "delete storage group root.a.*" we delete root.a.sg1
For "delete storage group root.a.sg1.*" we do not delete any sg.
For "delete storage group root.a.**" we delete root.a.sg1, root.a.b.sg2
If we also have another storage group “root.a”:
For "delete storage group root.a", we delete root.a
For "delete storage group root.a.*" we delete root.a.sg1 (because * does not include zero layer)
For "delete storage group root.a.**" we delete root.a, root.a.sg1, root.a.b.sg2 (because ** includes zero layer)
Best,
-----------------------------------
Zesong Sun
School of Software, Tsinghua University
孙泽嵩
清华大学 软件学院
> 2021年3月4日 11:13,weizihan0110 <wz...@163.com> 写道:
>
> Hi all:
> The initial discussion is at https://issues.apache.org/jira/browse/IOTDB-1160)
>
> First Solution:
>
> "*" matches just one layer and "**" matches one or more layers. As a result, the SQL statement "select * from root" have to be converted into "select ** from root". It seems a little bit disappointing.
>
> Second Solution:
> "*" matches one or more layers by default. And we can put something like "1 layer"(layer is the keyword) in the SQL statement to strengthen the semantics to match just one layer. More, "2 layers" to match just two layers and so on. This solution can be more scalable, I think.
>
>
> Does anyone have any idea about this? Welcome to discuss.