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-3694] Implement SINH function #1725

Merged
merged 1 commit into from
Mar 16, 2020

Conversation

XuQianJin-Stars
Copy link
Contributor

@XuQianJin-Stars XuQianJin-Stars commented Jan 6, 2020

As illustrated in CALCITE-3694
SINH function returns the hyperbolic sine of a number.
select sinh(1);
+--------------------+
| EXPR$0 |
+--------------------+
| 1.1752011936438014 |
+--------------------+
(1 row)

!ok

@@ -1705,6 +1705,7 @@ public SqlOperandCountRange getOperandCountRange() {
OperandTypes.NUMERIC,
SqlFunctionCategory.NUMERIC);

public static final SqlFunction SINH = SqlLibraryOperators.SINH;
Copy link
Contributor

Choose a reason for hiding this comment

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

is SINH part of standard SQL ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is SINH part of standard SQL ?

Actually I want to support standard SQL at the same time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I think if it's not part of standard SQL, it should not be in SqlStdOperatorTable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I think if it's not part of standard SQL, it should not be in SqlStdOperatorTable

hi @yanlin-Lynn I have changed it.

@@ -2325,6 +2325,7 @@ semantics.
| o | RTRIM(string) | Returns *string* with all blanks removed from the end
| m p | SHA1(string) | Calculates a SHA-1 hash value of *string* and returns it as a hex string
| m o p | SOUNDEX(string) | Returns the phonetic representation of *string*; throws if *string* is encoded with multi-byte encoding such as UTF-8
| o | SINH(numeric) | Returns the hyperbolic sine of *numeric*
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets maintain alphabetical order :)

Copy link
Contributor

@chunweilei chunweilei left a comment

Choose a reason for hiding this comment

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

LGTM

@chunweilei chunweilei added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Mar 12, 2020
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
Development

Successfully merging this pull request may close these issues.

4 participants