Hi all,

We recently encountered an interesting problem implementing the Having clause. 
In the Analyze phase, we needed to validate the input Having expression, 
including the GroupByLevel rule. The explain is as follows.

Input: path starting with root, levels array (ascending with no repeating 
elements)

Verification rules:
1. All layers must be * except root, level, and last (these layers can be *)
2. ** shall be regarded as one or more *

Output: If the verification fails, throw an exception

Sample:
1. Input: path=root.**.f2.g2.s2, levels=[2, 4] Check result: Failed
2. Input: path=root.**.f2.*.g2.s2, levels=[3, 5] Check result: Successful


We've already made an implementation, and you can review it to see if it's 
correct, or if you have other ways to implement this validation, we are happy 
to discuss!
https://apache-iotdb.feishu.cn/docx/doxcnnqVaqhf48K3Ja8z7sj90Wp

Reply via email to