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

[CALCITE-6312] Add LOG function (enabled in PostgreSQL library) #3839

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

caicancai
Copy link
Member

@caicancai caicancai commented Jul 1, 2024

@caicancai
Copy link
Member Author

caicancai commented Jul 1, 2024

In order to prevent LogImplementor from making the code redundant, I added SqlLibrary for identification.

@normanj-bitquill If the log function in Redshift is the same as postgres please let me know so I can modify it

final SqlOperatorFixture f = f0.withLibrary(SqlLibrary.POSTGRESQL);
f.checkScalar("log(10, 10)", 1.0,
"DOUBLE NOT NULL");
f.checkScalar("log(64, 8)", 2.0,
Copy link
Contributor

Choose a reason for hiding this comment

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

LOG(base, value), the result of log(64, 8) is not 2.0

Copy link
Member Author

Choose a reason for hiding this comment

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

ohhh, seems to be a bug in sqlfunctions, I open a new jira case, bigquery is log(64, 8) == 2?
I overlooked the problem, and I'm sorry

Copy link
Member Author

Choose a reason for hiding this comment

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

fix

@caicancai caicancai marked this pull request as draft July 3, 2024 02:40
@caicancai caicancai marked this pull request as ready for review July 3, 2024 15:24
@caicancai caicancai requested a review from YiwenWu July 3, 2024 15:26
@caicancai caicancai force-pushed the 6312 branch 2 times, most recently from fa068f0 to 97d0d99 Compare July 3, 2024 17:13
@caicancai
Copy link
Member Author

@YiwenWu @XuQianJin-Stars @NobiGo PATL, thanks

site/_docs/reference.md Outdated Show resolved Hide resolved
Copy link
Contributor

@YiwenWu YiwenWu left a comment

Choose a reason for hiding this comment

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

LGTM

@mihaibudiu mihaibudiu added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jul 18, 2024
Copy link

sonarcloud bot commented Jul 19, 2024

@mihaibudiu mihaibudiu merged commit 82a3219 into apache:main Jul 19, 2024
3 checks passed
@caicancai
Copy link
Member Author

@mihaibudiu @YiwenWu @XuQianJin-Stars Thank you for your review

@caicancai caicancai deleted the 6312 branch July 19, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM-will-merge-soon Overall PR looks OK. Only minor things left.
Projects
None yet
4 participants