You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geaflow.apache.org by "Leomrlin (via GitHub)" <gi...@apache.org> on 2026/06/18 03:36:24 UTC

[I] Add the date functions `QUARTER` / `DAY_OF_YEAR` [geaflow]

Leomrlin opened a new issue, #791:
URL: https://github.com/apache/geaflow/issues/791

   Add the date functions `QUARTER` / `DAY_OF_YEAR`
   
   **Built-in UDF · difficulty ⭐☆☆☆☆ · ~2–3h · skills: basic Java, date APIs**
   
   ### What & why
   
   The date folder `udf/table/date/` has 23 functions (`Year`, `Month`, `Day`,
   `WeekOfYear`, …) but is missing `QUARTER` (1–4) and `DAY_OF_YEAR` (1–366) —
   both heavily used in time-based analytics.
   
   日期函数目录已有 23 个,但缺 `QUARTER`(季度 1-4)和 `DAY_OF_YEAR`(一年中的第几天,
   1-366),这两个在时间维度分析里很常用。
   
   ### The task
   
   - `quarter(date)` → 1–4
   - `day_of_year(date)` → 1–366
   
   ### Where to look
   
   1. `udf/table/date/WeekOfYear.java` is the closest pattern ("turn a date into an
      integer"); add `Quarter.java` and `DayOfYear.java` alongside it.
   2. Register in `BuildInSqlFunctionTable.java`.
   3. Test leap years and year boundaries (e.g. 12/31, 1/1) plus null.
   
   ### Done when
   
   - [ ] Two functions implemented and registered
   - [ ] Leap year and start/end-of-year boundaries correct
   - [ ] Reuses the existing date-parsing approach (don't reinvent it)
   - [ ] Tests pass
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [I] Add the date functions `QUARTER` / `DAY_OF_YEAR` [geaflow]

Posted by "Alperenu0 (via GitHub)" <gi...@apache.org>.
Alperenu0 commented on issue #791:
URL: https://github.com/apache/geaflow/issues/791#issuecomment-4743479512

   Hi @Leomrlin, 
   
   I would love to work on this issue! I've reviewed the requirements and I am ready to implement the `QUARTER` and `DAY_OF_YEAR` functions. 
   
   I will use `WeekOfYear.java` as a template, register them in `BuildInSqlFunctionTable.java`, and write comprehensive tests covering leap years, boundaries (1/1 and 12/31), and null inputs.
   
   Could you please assign this to me?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org


Re: [I] Add the date functions `QUARTER` / `DAY_OF_YEAR` [geaflow]

Posted by "Leomrlin (via GitHub)" <gi...@apache.org>.
Leomrlin closed issue #791: Add the date functions `QUARTER` / `DAY_OF_YEAR`
URL: https://github.com/apache/geaflow/issues/791


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org