Add QUARTER and DAY_OF_YEAR date functions with tests and docs - #804
Open
Alperenu0 wants to merge 2 commits into
Open
Add QUARTER and DAY_OF_YEAR date functions with tests and docs#804Alperenu0 wants to merge 2 commits into
Alperenu0 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Implements missing date UDFs QUARTER and DAY_OF_YEAR and wires them into the DSL so they’re available for time-based analytics, with accompanying documentation updates.
Changes:
- Registers
QuarterandDayOfYearUDFs in the built-in SQL function table. - Updates date function documentation to include
quarterandday_of_year. - Updates test suite imports in preparation for new unit tests.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| geaflow/geaflow-dsl/geaflow-dsl-plan/src/test/java/org/apache/geaflow/dsl/udf/date/UDFDateTest.java | Adds imports for new date UDFs to support new/updated tests. |
| geaflow/geaflow-dsl/geaflow-dsl-plan/src/main/java/org/apache/geaflow/dsl/udf/table/date/WeekOfYear.java | Contains a whitespace-only header change that adds diff noise. |
| geaflow/geaflow-dsl/geaflow-dsl-plan/src/main/java/org/apache/geaflow/dsl/udf/table/date/DayOfYear.java | Contains a whitespace-only header change that adds diff noise. |
| geaflow/geaflow-dsl/geaflow-dsl-plan/src/main/java/org/apache/geaflow/dsl/schema/function/BuildInSqlFunctionTable.java | Registers the new Quarter and DayOfYear UDFs in the built-in SQL function table. |
| docs/docs-en/source/5.application-development/2.dsl/3.build-in/date.md | Documents syntax, description, and examples for quarter and day_of_year. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This PR implements the missing date functions
QUARTERandDAY_OF_YEARfor time-based analytics, as requested in the issue.Fixes #791
Brief change log
Quarter.javaandDayOfYear.javainudf/table/date/using the existing Joda-Time date-parsing approach (WeekOfYear.javaas a template).BuildInSqlFunctionTable.java.date.md) with syntax, descriptions, and examples for both functions.Verifying this change
This change added tests and can be verified as follows:
DateTimeUtilTest/DateFunctionTestor related test suites run successfully.Does this PR introduce a breaking change?