Hello everyone, I am trying to implement the group-by expression in VXQuery. However, I run into some issues regarding the type of the variables. Specifically, the output type of the grouping key is not set and as a result all the optimizations aren't called.
By comparing to AsterixDB, we saw that in the rewriter rule set, there is one rule (InferTypeRule) that is called almost in the beginning of the set and as a result, the output type of all the variables is set from the beginning and all the other rules depend on that. However, in VXQuery this rule is fired at the end of the rule set and for this reason the output type is not set. When we moved this rule to the beginning, we still get errors since all the other rules are not set to depend on the output type. So, do you believe that it is a good idea to try to adapt the rewriter rule set of VXQuery to the one of AsterixDB? Following is my pull request with the group by implementation in the translator and all the changes so far to the rewriter rules [1]. Thanks, Christina [1] https://github.com/apache/vxquery/pull/164/
