Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime functions in tremor std namespace #396

Open
anupdhml opened this issue Aug 12, 2020 · 3 comments
Open

Datetime functions in tremor std namespace #396

anupdhml opened this issue Aug 12, 2020 · 3 comments
Labels
_complexity:medium A task with a medium complexity that should be challanging enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed language _size:medium A medium sized task that will take some time to complete

Comments

@anupdhml
Copy link
Contributor

anupdhml commented Aug 12, 2020

Describe the problem you are trying to solve

A datetime module is absent from tremor-script stdlib right now. Functions related to datetime construction, parsing and formatting are useful in general for event processing needs.

There is already an underlying implementation for datetime functions in the tremor-script codebase (with datetime parse functionality utilized by datetime extractor) but the current implementation there needs rework and cleanup, so it was not exposed as part of tremor-script stdlib when the language got functions/modules (in v0.8).

As a workaround, these datetime functions can be currently accessed in tremor-script/trickle via core::datetime, and we as well as our users are relying on it for datetime needs (eg: as part of tests in the codebase itself). But this as a feature is intentionally undocumented so it's best if everyone moves away from it.

Describe the solution you'd like

Explore and propose ways in which the datetime module interface/implementation can be improved for usability and maintainability (eg: a lot of the functions there can now be implemented directly in tremor-script instead of rust). This can evolve into a RFC if the changes are substantial.

After discussions with @tremor-rs/tremor-core, implement the changes proposed.

As part of the implementation, make sure that the datetime extractor's functionality remains intact (also clean-up the currently broken datetime function links as part of the extractor's docs).

Notes

Datetime module docs from pre 0.8 days:
https://github.com/tremor-rs/tremor-www-docs/blob/v0.7.3/docs/tremor-script/functions/datetime.md

As part of the cleanup, we can also take inspiration from other languages on how they expose such functionality.

@anupdhml anupdhml added enhancement New feature or request language labels Aug 12, 2020
@Licenser
Copy link
Member

Yes! We need to clean up that module, a lot of the code can probably be implemented directly in tremorscript and not in a rust-function too which is kind of nice :)

@anupdhml anupdhml added the help wanted Extra attention is needed label Mar 16, 2021
@mfelsche mfelsche added _complexity:medium A task with a medium complexity that should be challanging _size:medium A medium sized task that will take some time to complete good first issue Good for newcomers hacktoberfest labels Sep 30, 2021
@mfelsche
Copy link
Member

We definitely need functions for producing timestamp strings (there are two RFC formats for this), as e.g. the google bigquery connector requires timestamp strings.

@Licenser
Copy link
Member

Licenser commented Oct 9, 2023

#1978 included some additiuonal asks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_complexity:medium A task with a medium complexity that should be challanging enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed language _size:medium A medium sized task that will take some time to complete
Projects
None yet
Development

No branches or pull requests

3 participants