Hi,+1 for Zesong's idea.
Chao Wang BONC, Ltd [email protected] On 3/8/2021 18:09,Xiangdong Huang<[email protected]> wrote: Hi, +1. ----------------------------------- Xiangdong Huang School of Software, Tsinghua University 黄向东 清华大学 软件学院 孙泽嵩 <[email protected]> 于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 <[email protected]> 写道: 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.
