Skip to content

Conversation

@gabriele-tomassetti
Copy link

@gabriele-tomassetti gabriele-tomassetti commented Jul 4, 2022

Task 1-2. Implement XQuery 3.1 Tumbling/Sliding Window expression

Description:

We have added support for Tumbling/Sliding Window expression (task 1-2), both in parsing and for the handling of intermediate AST.

In order to accomplish this task, we have added a new WindowExpr, that has WindowCondition fields.

Since, as stated in the Brief, you are willing to handle additional Java coding yourself, we have only added skeleton version of these classes. We have implemented just the necessary to test the parsing and AST creation. If this is not what you expected, let us know.

Some details regarding the implementation:

  • we implemented the Tumbling Window expression as a ForLetClause with the new ClauseType, ClauseType.Window
  • for consistency, the ForLetClause for Window Expression takes advantage of the field InputSequence inherited as a BindingExpression. The same field that is present for a traditional For or Let Clause, but we add a WindowExpr instead of a ForExpr in the Path expression. Let us know if this approach works for you or if you prefer to change it

Reference:

Reference

Type of tests:

We implemented a few tests in Java Code inside the file WindowClauseTest.java and . We have not implemented tests using XQSuite since they would require fully implement the aforementioned skeleton classes

@gabriele-tomassetti gabriele-tomassetti marked this pull request as ready for review July 13, 2022 13:04
adamretter added a commit that referenced this pull request Aug 25, 2022
…llection#0,#1

[feature] Implement the fn:uri-collection function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant