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

Add today alias for current_date #8423

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Conversation

smallzhongfeng
Copy link
Contributor

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Dec 5, 2023
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @smallzhongfeng for this PR
Please add also tests and user documentation scalar_functions.md

@alamb alamb changed the title Add another name for current_date Add today alias for current_date Dec 5, 2023
@smallzhongfeng
Copy link
Contributor Author

smallzhongfeng commented Dec 6, 2023

Thanks @smallzhongfeng for this PR Please add also tests and user documentation scalar_functions.md

Thanks. Updated.

@comphead
Copy link
Contributor

comphead commented Dec 6, 2023

Thanks @smallzhongfeng for this PR Please add also tests and user documentation scalar_functions.md

Thanks. Updated.

Please add today to the function list as well, see date_trunc, datetrunc as an example.

Also the tests are needed, we can likely use timestamps.slt sqllogic file as the test location

@smallzhongfeng
Copy link
Contributor Author

I add a test, because the function today is real-time, I can only compare it with the function now.

true

query B
select now() = current_date();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add it for today as well?

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @smallzhongfeng

@comphead
Copy link
Contributor

comphead commented Dec 6, 2023

Thanks @smallzhongfeng
Please add today to the function list in the doc, like in https://github.com/apache/arrow-datafusion/blob/9be75f71eb59a359674669f5c2688f49f44b4050/docs/source/user-guide/sql/scalar_functions.md?plain=1#L1282

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again @smallzhongfeng -- this looks great

Co-authored-by: Alex Huang <huangweijun1001@gmail.com>
@Dandandan Dandandan merged commit 1154274 into apache:main Dec 12, 2023
23 checks passed
@Dandandan
Copy link
Contributor

Thank you @Weijun-H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions sqllogictest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants