You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Databend currently supports adding and subtracting various time units such as years, months, days, hours, minutes, and seconds, but it appears that the week unit is not yet supported for the DATE_ADD function [1][2].
To add support for the week unit, you would need to follow these steps:
Implement the Function:
Add the logic for handling the week unit in the relevant function, such as date_add or add_weeks.
Register the Function:
Register the new function in the register_add_functions method in src/query/functions/src/scalars/datetime.rs.
Add Tests:
Add unit tests for the new functionality in src/query/functions/tests/it/scalars/datetime.rs.
Update Documentation:
Ensure that the new functionality is documented appropriately.
For detailed guidance on writing and registering new functions, you can refer to the following guides:
Summary
Not able to perform Date operations with unit week. Can it be added as a additional support for
week
.QUERY:
SELECT DATE_ADD('week', 1, TODAY());
The text was updated successfully, but these errors were encountered: